libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
Use the TSC timer to measure intervals. More...
Namespaces | |
namespace | 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::LIBJMMCG_VER_NAMESPACE::cpu_timer::element_type = typedef std::uint64_t |
Definition at line 108 of file hp_timer.hpp.
|
inlinenoexcept |
Busy wait for a certain period.
delay | In microseconds. |
Definition at line 233 of file hp_timer.hpp.
References jmmcg::LIBJMMCG_VER_NAMESPACE::cpu_timer::in_order::get_end(), jmmcg::LIBJMMCG_VER_NAMESPACE::cpu_timer::in_order::get_start(), and TSC_to_microsec().
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE_TEMPLATE().
|
inlinenoexcept |
Definition at line 212 of file hp_timer.hpp.
References jmmcg::LIBJMMCG_VER_NAMESPACE::cpu_timer::private_::ticks_per_microsec_details::mean.
Referenced by pause_for_usec(), and jmmcg::LIBJMMCG_VER_NAMESPACE::latency_timestamps_itf::timestamp::to_csv().
|
inlinenoexcept |
Definition at line 221 of file hp_timer.hpp.