From ad64bab5b225028c65f341c6c44369ab5e636edf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 12:17:23 +0200 Subject: [PATCH] Chrono: add method SignedSongTime::Negative() --- src/Chrono.hxx | 7 +++++++ 1 file changed, 7 insertions(+) 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); }