From abb104dca0cd3e702c16de5766588afeec20184d Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 3 Feb 2022 23:28:20 +0100 Subject: [PATCH] Update Duration.h --- src/common/Utilities/Duration.h | 41 +++++++++++---------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/src/common/Utilities/Duration.h b/src/common/Utilities/Duration.h index 5906c0e189..22aa53c2da 100644 --- a/src/common/Utilities/Duration.h +++ b/src/common/Utilities/Duration.h @@ -32,22 +32,6 @@ using Seconds = std::chrono::seconds; /// Minutes shorthand typedef. using Minutes = std::chrono::minutes; -/// Hours shorthand typedef. -using Hours = std::chrono::hours; - -#if __cplusplus > 201703L -/// Days shorthand typedef. -using Days = std::chrono::days; - -/// Weeks shorthand typedef. -using Weeks = std::chrono::weeks; - -/// Years shorthand typedef. -using Years = std::chrono::years; - -/// Months shorthand typedef. -using Months = std::chrono::months; - // Fix GCC for C++20 #if defined(__GNUC__) && !defined(__clang__) /// days @@ -62,21 +46,24 @@ using Years = std::chrono::duration<_GLIBCXX_CHRONO_INT64_T, ratio<31556952>>; /// months using Months = std::chrono::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, Hours::period>>; -/// Weeks shorthand typedef. (delete after start support c++20) -using Weeks = std::chrono::duration, Days::period>>; +/// Hours shorthand typedef. +using Hours = std::chrono::hours; -/// Years shorthand typedef. (delete after start support c++20) -using Years = std::chrono::duration, Days::period>>; +/// Days shorthand typedef. +using Days = std::chrono::days; -/// Months shorthand typedef. (delete after start support c++20) -using Months = std::chrono::duration>>; -#endif +/// Weeks shorthand typedef. +using Weeks = std::chrono::weeks; + +/// Years shorthand typedef. +using Years = std::chrono::years; + +/// Months shorthand typedef. +using Months = std::chrono::months; + +#endif // GCC_VERSION /// time_point shorthand typedefs using TimePoint = std::chrono::steady_clock::time_point;