diff options
Diffstat (limited to 'absl/time/internal/get_current_time_windows.inc')
-rw-r--r-- | absl/time/internal/get_current_time_windows.inc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/absl/time/internal/get_current_time_windows.inc b/absl/time/internal/get_current_time_windows.inc new file mode 100644 index 000000000000..b22a9c9e9e2e --- /dev/null +++ b/absl/time/internal/get_current_time_windows.inc @@ -0,0 +1,17 @@ +#include "absl/time/clock.h" + +#include <chrono> +#include <cstdint> + +namespace absl { +namespace time_internal { + +static int64_t GetCurrentTimeNanosFromSystem() { + return std::chrono::duration_cast<std::chrono::nanoseconds>( + std::chrono::system_clock::now() - + std::chrono::system_clock::from_time_t(0)) + .count(); +} + +} // namespace time_internal +} // namespace absl |