19 typedef duration::rep
rep;
21 typedef std::chrono::time_point<ClockCLib, duration>
time_point;
25 std::clock_t t = std::clock();
26 if (static_cast<std::clock_t>(-1) == t) {
27 throw std::runtime_error(
"Error in CallClockCLib");
30 constexpr
double conv = 1.0 / CLOCKS_PER_SEC;
31 constexpr
double ratio =
static_cast<double>(period::den) / static_cast<double>(period::num);
32 const duration d(static_cast<rep>(static_cast<double>(t) * conv * ratio));
Clock based on C library clock_t clock() which returns an approximate processor time in ticks...
std::chrono::milliseconds duration
std::chrono::time_point< ClockCLib, duration > time_point