38 #ifndef LIBPMEMOBJ_CPP_CONVERSIONS_HPP
39 #define LIBPMEMOBJ_CPP_CONVERSIONS_HPP
57 template <
typename Clock,
typename Duration =
typename Clock::duration>
59 timepoint_to_timespec(
const std::chrono::time_point<Clock, Duration> &timepoint)
62 auto rel_duration = timepoint.time_since_epoch();
64 std::chrono::duration_cast<std::chrono::seconds>(rel_duration);
66 ts.tv_sec = sec.count();
67 ts.tv_nsec =
static_cast<long>(
68 std::chrono::duration_cast<std::chrono::nanoseconds>(
Definition: allocator.hpp:48