| QUARK_TIME_TO_WALLCLOCK(3) | Library Functions Manual | QUARK_TIME_TO_WALLCLOCK(3) |
quark_time_to_wallclock —
translate a time since boot to wallclock
#include
<quark.h>
u64
quark_time_to_wallclock(u64
time_since_boot);
quark_time_to_wallclock translates
time_since_boot from nanoseconds since boot to
nanoseconds since the Unix epoch by adding the internal boottime epoch, see
quark_get_boottime(3).
All times handed out by quark are suitable inputs: time of quark_event, proc_time_boot and exit_time_event of quark_process, as well as established_time and close_time of quark_socket. These fields are expressed as nanoseconds since boot since quark 0.8, in earlier versions they were nanoseconds since the Unix epoch and needed no translation.
Times since boot are immune to system clock changes, wallclock times are not. Translate at the last moment, when a time leaves the system for display or storage, and keep the epoch fresh with quark_update_boottime(3) if the clock may be stepped while running. Gradual corrections (slewing) adjust the wallclock and the boot clock at the same rate, leaving the epoch untouched, only a step moves it.
On the KPROBE backend, events in flight across a suspend may carry a time shifted late by up to that suspend's duration, see quark_queue_open(3).
time_since_boot expressed in nanoseconds since the Unix epoch.
quark_event_dump(3), quark_get_boottime(3), quark_process_iter(3), quark_process_lookup(3), quark_queue_block(3), quark_queue_close(3), quark_queue_default_attr(3), quark_queue_get_epollfd(3), quark_queue_get_event(3), quark_queue_get_stats(3), quark_queue_open(3), quark_update_boottime(3), quark(7), quark-btf(8), quark-mon(8), quark-test(8)
quark_time_to_wallclock appeared in quark
0.8, when all times handed out by quark switched from nanoseconds since the
Unix epoch to nanoseconds since boot.
| August 28, 2026 | Linux |