about summary refs log tree commit diff
path: root/absl/time/internal/get_current_time_windows.inc
blob: b22a9c9e9e2e86d4379e380c23535cb7da75aa1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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