Abseil Common Libraries (C++) (grcp 依赖)
https://abseil.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
398 B
17 lines
398 B
#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
|
|
|