MPD
0.20.6
|
A time stamp within a song. More...
#include <Chrono.hxx>
Public Member Functions | |
SongTime ()=default | |
template<typename T > | |
constexpr | SongTime (T t) |
constexpr rep | ToS () const |
constexpr rep | RoundS () const |
constexpr rep | ToMS () const |
template<typename T = rep> | |
constexpr T | ToScale (unsigned scale) const |
constexpr double | ToDoubleS () const |
constexpr bool | IsZero () const |
constexpr bool | IsPositive () const |
constexpr SongTime | operator+ (const SongTime &other) const |
constexpr SongTime | operator- (const SongTime &other) const |
Static Public Member Functions | |
static constexpr SongTime | zero () |
static constexpr SongTime | FromS (unsigned s) |
static constexpr SongTime | FromS (float s) |
static constexpr SongTime | FromS (double s) |
static constexpr SongTime | FromMS (rep ms) |
template<typename T = rep> | |
static constexpr SongTime | FromScale (T value, unsigned scale) |
Convert a scalar value with the given scale to a SongTime instance. More... | |
A time stamp within a song.
Granularity is 1 millisecond and the maximum value is about 49 days.
Definition at line 31 of file Chrono.hxx.
|
default |
|
inlineexplicit |
Definition at line 39 of file Chrono.hxx.
|
inlinestatic |
Definition at line 57 of file Chrono.hxx.
|
inlinestatic |
Definition at line 45 of file Chrono.hxx.
|
inlinestatic |
Definition at line 49 of file Chrono.hxx.
|
inlinestatic |
Definition at line 53 of file Chrono.hxx.
|
inlinestatic |
Convert a scalar value with the given scale to a SongTime instance.
value | the input value |
scale | the value's scale in Hz |
Definition at line 86 of file Chrono.hxx.
|
inline |
Definition at line 98 of file Chrono.hxx.
|
inline |
Definition at line 94 of file Chrono.hxx.
Definition at line 102 of file Chrono.hxx.
Definition at line 106 of file Chrono.hxx.
|
inline |
Definition at line 65 of file Chrono.hxx.
|
inline |
Definition at line 90 of file Chrono.hxx.
|
inline |
Definition at line 69 of file Chrono.hxx.
|
inline |
Definition at line 61 of file Chrono.hxx.
|
inline |
Definition at line 74 of file Chrono.hxx.
|
inlinestatic |
Definition at line 41 of file Chrono.hxx.