diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-03-10 19:08:03 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-03-10 19:08:03 +0100 |
commit | bc7c4cb72790ff7f64917cdb63f9b6c209c75384 (patch) | |
tree | a5e0a4407e15dddfad6df39320141c9159841b59 /compat | |
parent | 958b2c1bed7603dd0eb16c2a403ab9efd8e6b20f (diff) |
compat/time{,r}: get rid of `long long'
Diffstat (limited to 'compat')
-rw-r--r-- | compat/time.hpp | 5 | ||||
-rw-r--r-- | compat/timer.hpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/compat/time.hpp b/compat/time.hpp index d34e4e8c..c246a9e5 100644 --- a/compat/time.hpp +++ b/compat/time.hpp @@ -8,7 +8,7 @@ template<typename repr, typename ratio = std::ratio<1>> using duration = std::chrono::duration<repr, ratio>; template<typename t, typename u> -static inline constexpr auto time_cast(const u& in) +static inline constexpr auto time_cast(u&& in) { return std::chrono::duration_cast<t>(in); } @@ -17,7 +17,6 @@ using secs = duration<double>; using secs_ = duration<long>; using ms = duration<double, std::milli>; using us = duration<double, std::micro>; -using us_ = duration<long long, std::micro>; -using ns = duration<long long, std::nano>; +using ns = duration<double, std::nano>; } // ns time_units diff --git a/compat/timer.hpp b/compat/timer.hpp index 03b537ac..3ceda093 100644 --- a/compat/timer.hpp +++ b/compat/timer.hpp @@ -33,7 +33,7 @@ public: } template<typename t> - bool is_elapsed(const t& time_value) + bool is_elapsed(t&& time_value) { using namespace time_units; |