Chrono: add method SignedSongTime::Negative()

This commit is contained in:
Max Kellermann 2014-08-29 12:17:23 +02:00
parent f02998b106
commit ad64bab5b2

View File

@ -106,6 +106,13 @@ public:
return SignedSongTime(Base::zero()); return SignedSongTime(Base::zero());
} }
/**
* Generate a negative value.
*/
static constexpr SignedSongTime Negative() {
return SignedSongTime(-1);
}
static constexpr SignedSongTime FromS(int s) { static constexpr SignedSongTime FromS(int s) {
return SignedSongTime(rep(s) * 1000); return SignedSongTime(rep(s) * 1000);
} }