|
High-resolution, low-cost timing routines. More...
Go to the source code of this file.
Classes | |
struct | ArchIntervalTimer |
A simple timer class for measuring an interval of time using the ArchTickTimer facilities. More... | |
Functions | |
uint64_t | ArchGetTickTime () |
Return the current time in system-dependent units. | |
uint64_t | ArchGetStartTickTime () |
Get a "start" tick time for measuring an interval of time, followed by a later call to ArchGetStopTickTime(). | |
uint64_t | ArchGetStopTickTime () |
Get a "stop" tick time for measuring an interval of time. | |
ARCH_API uint64_t | ArchGetTickQuantum () |
Return the tick time resolution. | |
ARCH_API uint64_t | ArchGetIntervalTimerTickOverhead () |
Return the ticks taken to record an interval of time with ArchIntervalTimer, as measured at startup time. | |
ARCH_API int64_t | ArchTicksToNanoseconds (uint64_t nTicks) |
Convert a duration measured in "ticks", as returned by ArchGetTickTime() , to nanoseconds. | |
ARCH_API double | ArchTicksToSeconds (uint64_t nTicks) |
Convert a duration measured in "ticks", as returned by ArchGetTickTime() , to seconds. | |
ARCH_API uint64_t | ArchSecondsToTicks (double seconds) |
Convert a duration in seconds to "ticks", as returned by ArchGetTickTime() . | |
ARCH_API double | ArchGetNanosecondsPerTick () |
Get nanoseconds per tick. | |
template<class Fn > | |
uint64_t | ArchMeasureExecutionTime (Fn const &fn, uint64_t maxTicks=1e7, bool *reachedConsensus=nullptr) |
Run fn repeatedly attempting to determine a consensus fastest execution time with low noise, for up to maxTicks , then return the consensus fastest execution time. | |
High-resolution, low-cost timing routines.
Definition in file timing.h.