diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-10 12:50:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-10 12:50:25 +0200 |
commit | d415d383db1e1cf8038ffb34459864e3b6e19f39 (patch) | |
tree | 888cfaaab4733269b4342ea0337460f774c87023 /compat/time.hpp | |
parent | 1a4ad209341b7ef2364f7b6bc8195a4ac93838d0 (diff) |
minor cleanup only
Diffstat (limited to 'compat/time.hpp')
-rw-r--r-- | compat/time.hpp | 8 |
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>; |