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.
18 lines
398 B
18 lines
398 B
7 years ago
|
#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
|