41 std::chrono::nanoseconds result =
42 std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec);
43 return result.count();
51 #ifdef FOLLY_HAVE_LINUX_VDSO 55 struct VdsoInitializer {
57 m_handle = dlopen(
"linux-vdso.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
62 void* p = dlsym(m_handle,
"__vdso_clock_gettime");
66 p = dlsym(m_handle,
"__vdso_clock_gettime_ns");
84 static const VdsoInitializer vdso_initializer;
int(* clock_gettime)(clockid_t, timespec *ts)
int64_t(* clock_gettime_ns)(clockid_t)
—— Concurrent Priority Queue Implementation ——
static int64_t clock_gettime_ns_fallback(clockid_t clock)