diff options
author | Max Kellermann <max@duempel.org> | 2014-08-29 12:17:23 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-29 12:18:13 +0200 |
commit | ad64bab5b225028c65f341c6c44369ab5e636edf (patch) | |
tree | a6a145bf9592a1e6253aca1bd1d44c8b3d4712fa /src/Chrono.hxx | |
parent | f02998b106a73281356d69cc7b19d069aea8cf0d (diff) |
Chrono: add method SignedSongTime::Negative()
Diffstat (limited to 'src/Chrono.hxx')
-rw-r--r-- | src/Chrono.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Chrono.hxx b/src/Chrono.hxx index de5122fd0..db7605726 100644 --- a/src/Chrono.hxx +++ b/src/Chrono.hxx @@ -106,6 +106,13 @@ public: return SignedSongTime(Base::zero()); } + /** + * Generate a negative value. + */ + static constexpr SignedSongTime Negative() { + return SignedSongTime(-1); + } + static constexpr SignedSongTime FromS(int s) { return SignedSongTime(rep(s) * 1000); } |