MCPcopy Create free account
hub / github.com/coreboot/coreboot / timestamp_get

Function timestamp_get

src/lib/timestamp.c:296–307  ·  view source on GitHub ↗

Provide default timestamp implementation using monotonic timer. */

Source from the content-addressed store, hash-verified

294
295/* Provide default timestamp implementation using monotonic timer. */
296uint64_t __weak timestamp_get(void)
297{
298 struct mono_time t1, t2;
299
300 if (!CONFIG(HAVE_MONOTONIC_TIMER))
301 return 0;
302
303 mono_time_set_usecs(&t1, 0);
304 timer_monotonic_get(&t2);
305
306 return mono_time_diff_microseconds(&t1, &t2);
307}
308
309/* Like timestamp_get() above this matches up with microsecond granularity. */
310int __weak timestamp_tick_freq_mhz(void)

Callers 6

timestamp_add_nowFunction · 0.70
get_us_since_bootFunction · 0.70
mainFunction · 0.70
mainFunction · 0.70
mainFunction · 0.50
mainFunction · 0.50

Calls 3

mono_time_set_usecsFunction · 0.85
timer_monotonic_getFunction · 0.50

Tested by

no test coverage detected