-static uint64_t
-get_timestamp_ns()
-{
- return clock_gettime_nsec_np(kWallTimeClock);
-}
-
-static unsigned int
-get_ncpu(void)
-{
- int ncpu;
- size_t sysctl_size = sizeof(ncpu);
- int ret = sysctlbyname("hw.ncpu", &ncpu, &sysctl_size, NULL, 0);
- assert(ret == 0);
- return (unsigned int) ncpu;
-}
-