#include <common/xroad_common_types.h>
#include <time.h>
#include <x86intrin.h>
Go to the source code of this file.
◆ anonymous enum
| Enumerator |
|---|
| xroad_priv_tsc_conv_shift | Number of bit to shift-right in TSC<->nsec conversion.
|
◆ xroad_tsc_time_pair_now()
| xroad_tsc_t xroad_tsc_time_pair_now |
( |
clockid_t |
clockid, |
|
|
uint64_t * |
ns |
|
) |
| |
Obtain a relatively accurate time-pair, TSC and wallclock in nanoseconds since epoche.
NB The returned timepair might be a bit behind against current time as it tends to get an accurate match between wallclock and TSC.
- Parameters
-
| [out] | - | time in nanoseconds |
- Returns
- time in TSC