diff options
author | Jack Lloyd <[email protected]> | 2016-11-21 10:15:52 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-21 10:15:52 -0500 |
commit | a957796da6343e76130a87eecc4c71c78580c759 (patch) | |
tree | c8f4a0a9ab87cc23497ce5480f039fb6381ef261 /src | |
parent | 100fd1eb5a0adc297f3d8475f88f6f606c6e66ba (diff) |
Fix doc of get_processor_timestamp [ci skip]
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/utils/os_utils.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/utils/os_utils.h b/src/lib/utils/os_utils.h index 590ed4ae7..c8cd599d0 100644 --- a/src/lib/utils/os_utils.h +++ b/src/lib/utils/os_utils.h @@ -20,11 +20,17 @@ namespace OS { uint32_t get_process_id(); /** +* Return the highest resolution clock available on the system. +* +* The epoch and update rate of this clock is arbitrary and depending +* on the hardware it may not tick at a constant rate. +* * Returns the value of the hardware cycle counter, if available. -* Returns 0 if not available. On Windows uses QueryPerformanceCounter. -* On other platforms reads the native cycle counter directly. -* The epoch and update rate are arbitrary and may not be constant -* (depending on the hardware). +* On Windows calls QueryPerformanceCounter. +* Under GCC or Clang on supported platforms the hardware cycle counter is queried: +* x86, PPC, Alpha, SPARC, IA-64, S/390x, and HP-PA +* On other platforms clock_gettime is used with some monotonic timer, if available. +* As a final callback std::chrono::high_resolution_clock is used. */ uint64_t get_processor_timestamp(); |