From cd482ca6557c211043e3bd892bf75dab6c9ba92b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 27 Aug 2014 18:39:39 +0200 Subject: Chrono: add method ToDoubleS() --- src/Chrono.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 -- cgit v1.2.3