libjmmcg
build_2783
A C++ library containing an eclectic mix of useful, advanced components.
|
#include <hp_timer.hpp>
Public Types | |
typedef ppd::api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, Mdl > | lock_traits |
typedef lock_traits::exception_type | exception_type |
typedef unsigned long long | value_type |
The units are microseconds. More... | |
typedef timespec | time_utc_t |
Public Member Functions | |
__stdcall | hp_timer () noexcept(false) FORCE_INLINE |
const time_utc_t __fastcall | current_time () const noexcept(false) FORCE_INLINE |
Return the current time in a resolution of 1/frequency units. More... | |
Static Public Member Functions | |
static value_type __fastcall | to_usec (const time_utc_t ticks) noexcept(true) FORCE_INLINE |
Convert a value_type in units of 1/frequency to usec. More... | |
static value_type __fastcall | current_count () noexcept(false) FORCE_INLINE |
The current count in units of 1/frequency. More... | |
Public Attributes | |
const time_utc_t | start_up_time |
const value_type | start_up_count |
In usec. More... | |
Friends | |
std::ostream &__fastcall | operator<< (std::ostream &o, const time_utc_t &t) |
Definition at line 50 of file hp_timer.hpp.
typedef lock_traits::exception_type jmmcg::hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >::exception_type |
Definition at line 70 of file hp_timer.hpp.
typedef ppd::api_lock_traits<ppd::generic_traits::api_type::posix_pthreads, Mdl> jmmcg::hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >::lock_traits |
Definition at line 69 of file hp_timer.hpp.
typedef timespec jmmcg::hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >::time_utc_t |
Definition at line 73 of file hp_timer.hpp.
typedef unsigned long long jmmcg::hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >::value_type |
The units are microseconds.
Definition at line 72 of file hp_timer.hpp.
|
inlinenoexcept |
Definition at line 70 of file hp_timer_impl.hpp.
|
inlinestaticnoexcept |
The current count in units of 1/frequency.
Definition at line 58 of file hp_timer_impl.hpp.
|
inlinenoexcept |
Return the current time in a resolution of 1/frequency units.
Note that this will have a systematic offset according to the properties of GetSystemTimeAsFileTime().
Definition at line 64 of file hp_timer_impl.hpp.
|
inlinestaticnoexcept |
Convert a value_type in units of 1/frequency to usec.
Definition at line 41 of file hp_timer_impl.hpp.
|
friend |
Implemented using the advice given in "Standard C++ IOStreams and Locales" by A.Langer & K.Kreft, page 170.
const value_type jmmcg::hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >::start_up_count |
const time_utc_t jmmcg::hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >::start_up_time |
Time when the process started up.
Definition at line 78 of file hp_timer.hpp.