diff options
author | Max Kellermann <max@duempel.org> | 2014-08-27 18:39:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-27 18:41:33 +0200 |
commit | cd482ca6557c211043e3bd892bf75dab6c9ba92b (patch) | |
tree | f6fec67ebed677e57f90ed62e7dc8353054ae71a | |
parent | e43b56eb3842e4691fe1b6a30db40d9aa94860fe (diff) | |
download | mpd-cd482ca6557c211043e3bd892bf75dab6c9ba92b.tar.gz mpd-cd482ca6557c211043e3bd892bf75dab6c9ba92b.tar.xz mpd-cd482ca6557c211043e3bd892bf75dab6c9ba92b.zip |
Chrono: add method ToDoubleS()
Diffstat (limited to '')
-rw-r--r-- | src/Chrono.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Chrono.hxx b/src/Chrono.hxx index 97e3ddc24..e9edb8b09 100644 --- a/src/Chrono.hxx +++ b/src/Chrono.hxx @@ -61,6 +61,10 @@ public: constexpr T ToScale(unsigned base) const { return count() * T(base) / 1000; } + + constexpr double ToDoubleS() const { + return double(count()) / 1000.; + }; }; #endif |