summaryrefslogtreecommitdiffhomepage
path: root/compat/time.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/time.hpp')
-rw-r--r--compat/time.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/compat/time.hpp b/compat/time.hpp
index b560da70..c07f29cb 100644
--- a/compat/time.hpp
+++ b/compat/time.hpp
@@ -1,10 +1,12 @@
#pragma once
+#include "compat/functional.hpp"
+
#include <chrono>
namespace time_units {
-template<typename repr, typename ratio>
+template<typename repr, typename ratio = std::ratio<1>>
using duration = std::chrono::duration<repr, ratio>;
template<typename t, typename u>
@@ -13,8 +15,8 @@ static inline constexpr auto time_cast(const u& in)
return std::chrono::duration_cast<t>(in);
}
-using secs = duration<double, std::ratio<1, 1>>;
-using secs_ = duration<long long, std::ratio<1, 1>>;
+using secs = duration<double>;
+using secs_ = duration<long>;
using ms = duration<double, std::milli>;
using ms_ = duration<long long, std::milli>;
using us = duration<double, std::micro>;