Update Duration.h

This commit is contained in:
Kitzunu
2022-02-03 22:50:04 +01:00
parent eee6a554c1
commit 8ce0e2fd97

View File

@@ -48,8 +48,8 @@ using Years = std::chrono::years;
/// Months shorthand typedef.
using Months = std::chrono::months;
// Fix GCC for C++20
#if GCC_VERSION
/// days
using Days = duration<_GLIBCXX_CHRONO_INT64_T, ratio<86400>>;
@@ -62,6 +62,8 @@ using Years = duration<_GLIBCXX_CHRONO_INT64_T, ratio<31556952>>;
/// months
using Months = duration<_GLIBCXX_CHRONO_INT64_T, ratio<2629746>>;
#endif // GCC_VERSION
#else
/// Days shorthand typedef. (delete after start support c++20)
using Days = std::chrono::duration<int, std::ratio_multiply<std::ratio<24>, Hours::period>>;