xtd 0.2.0
chrono.h
Go to the documentation of this file.
1 #pragma once
4 #include <chrono>
5 #include <ratio>
6 
8 #define __GCC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
9 #if __cplusplus <= 201703L || (_MSC_VER && _MSC_VER < 1929) || (!__clang__ && !_MSC_VER && __GCC_VERSION__ < 100000)
10 namespace std {
11  namespace chrono {
12  using days = std::chrono::duration<long, std::ratio<86400>>;
13  using weeks = std::chrono::duration<long, std::ratio<604800>>;
14  using months = std::chrono::duration<long, std::ratio<2629746>>;
15  using years = std::chrono::duration<long, std::ratio<31556952>>;
16  }
17 }
18 #endif
19