summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/time.hpp5
-rw-r--r--compat/timer.hpp2
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;