aboutsummaryrefslogtreecommitdiffstats
path: root/src/Chrono.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-27 18:39:39 +0200
committerMax Kellermann <max@duempel.org>2014-08-27 18:41:33 +0200
commitcd482ca6557c211043e3bd892bf75dab6c9ba92b (patch)
treef6fec67ebed677e57f90ed62e7dc8353054ae71a /src/Chrono.hxx
parente43b56eb3842e4691fe1b6a30db40d9aa94860fe (diff)
downloadmpd-cd482ca6557c211043e3bd892bf75dab6c9ba92b.tar.gz
mpd-cd482ca6557c211043e3bd892bf75dab6c9ba92b.tar.xz
mpd-cd482ca6557c211043e3bd892bf75dab6c9ba92b.zip
Chrono: add method ToDoubleS()
Diffstat (limited to 'src/Chrono.hxx')
-rw-r--r--src/Chrono.hxx4
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