libjmmcg
build_2783
A C++ library containing an eclectic mix of useful, advanced components.
|
Use the TSC timer to measure intervals. More...
Namespaces | |
private_ | |
Classes | |
class | in_order |
Measure a time interval using derivatives of the CPU instruction RDTSC. More... | |
class | out_of_order |
Measure a time interval using the CPU instruction RDTSC. More... | |
Typedefs | |
using | element_type = std::uint64_t |
Functions | |
double | TSC_to_microsec (element_type ticks) noexcept(true) |
boost::posix_time::ptime | TSC_to_UTC (element_type ticks) noexcept(true) |
double | pause_for_usec (double delay) noexcept(true) |
Busy wait for a certain period. More... | |
Use the TSC timer to measure intervals.
To determine is the TSC is available or reliable, on Linux the contents of: /sys/devices/system/clocksource/clocksource0/available_clocksource should be examined. This also indicates if the TSCs between processors are synchronised [1], section 17.16.1.
[1] "IntelĀ® 64 and IA-32 Architectures Developer's Manual", https://www-ssl.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-manual-325462.html
using jmmcg::cpu_timer::element_type = typedef std::uint64_t |
Definition at line 100 of file hp_timer.hpp.
|
inlinenoexcept |
Busy wait for a certain period.
delay | In microseconds. |
Definition at line 225 of file hp_timer.hpp.
|
inlinenoexcept |
Definition at line 204 of file hp_timer.hpp.
|
inlinenoexcept |
Definition at line 213 of file hp_timer.hpp.