10 #include <mach/clock.h>
11 #include <mach/mach.h>
12 #define GET_CLOCK_MONOTONIC(ts) \
14 clock_serv_t cclock; \
15 mach_timespec_t mts; \
16 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock); \
17 clock_get_time(cclock, &mts); \
18 mach_port_deallocate(mach_task_self(), cclock); \
19 ts.tv_sec = mts.tv_sec; \
20 ts.tv_nsec = mts.tv_nsec; \
23 #define GET_CLOCK_MONOTONIC(ts) clock_gettime(CLOCK_MONOTONIC, &ts);
29 : m_parent1(parent1), m_parent2(parent2) {
39 int ms = 1000 * (stop.tv_sec -
m_start.tv_sec) + (stop.tv_nsec -
m_start.tv_nsec) / 1e6;
40 edm::LogVerbatim(
"XrdAdaptorInternal") <<
"Finished timer after " << ms << std::endl;
50 that.m_parent1 =
nullptr;
51 that.m_parent2 =
nullptr;
52 that.m_start = {0, 0};
70 : m_value(default_value),
73 m_interval0_start(
now.tv_sec),
77 m_interval4_val(-1) {}
80 std::unique_lock<std::mutex> sentry(
m_mutex);
99 std::unique_lock<std::mutex> sentry(
m_mutex);
140 itFound = insertResult.first;
141 if (insertResult.second) {
145 return itFound->second->newSource(
now);