17 #include <x86intrin.h> 32 template <
typename Precision = std::chrono::microseconds>
36 typedef typename Precision::rep
rep;
37 typedef typename Precision::period
period;
44 static_assert( period::num == 1,
"The Precision of RdtscClock must be reducible to 1/N" );
46 "The Precision of RdtscClock must be at least std::chrono::milliseconds" );
72 auto dt_ref = std::chrono::duration_cast<std::chrono::milliseconds>( t2_ref - t1_ref ).count();
static rep do_calibrate() noexcept
static rep ticks_per_unit() noexcept
static rep calibrate() noexcept
Calibrate the RDTSC clock against wall time.
static time_point now() noexcept
A std::chrono compatible Clock using rdtsc as its timing source.
std::chrono::duration< rep, period > duration
std::chrono::time_point< RdtscClock > time_point
static constexpr bool is_steady
Header file for std:chrono::duration-based Counters.