MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / init_rdtsc_per_sec

Function init_rdtsc_per_sec

lib/precise_time.c:153–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151
152static uint64_t rdtsc_per_sec = 0;
153static void __attribute__((constructor)) init_rdtsc_per_sec()
154{
155 uint64_t before, after;
156
157 before = rdtsc();
158 usleep(USECS_PER_SEC);
159 after = rdtsc();
160
161 rdtsc_per_sec = after - before;
162}
163
164double monotonic_seconds()
165{

Callers

nothing calls this directly

Calls 2

rdtscFunction · 0.85
usleepFunction · 0.70

Tested by

no test coverage detected