aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-29 12:17:23 +0200
committerMax Kellermann <max@duempel.org>2014-08-29 12:18:13 +0200
commitad64bab5b225028c65f341c6c44369ab5e636edf (patch)
treea6a145bf9592a1e6253aca1bd1d44c8b3d4712fa /src
parentf02998b106a73281356d69cc7b19d069aea8cf0d (diff)
downloadmpd-ad64bab5b225028c65f341c6c44369ab5e636edf.tar.gz
mpd-ad64bab5b225028c65f341c6c44369ab5e636edf.tar.xz
mpd-ad64bab5b225028c65f341c6c44369ab5e636edf.zip
Chrono: add method SignedSongTime::Negative()
Diffstat (limited to 'src')
-rw-r--r--src/Chrono.hxx7
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);
}