diff options
author | misterg <misterg@google.com> | 2017-09-19T20·54-0400 |
---|---|---|
committer | misterg <misterg@google.com> | 2017-09-19T20·54-0400 |
commit | c2e754829628d1e9b7a16b3389cfdace76950fdf (patch) | |
tree | 5a7f056f44e27c30e10025113b644f0b3b5801fc /absl/time/internal/get_current_time_windows.inc |
Initial Commit
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 |