| QUARK_GET_BOOTTIME(3) | Library Functions Manual | QUARK_GET_BOOTTIME(3) |
quark_get_boottime —
get the boottime epoch used for wallclock
translation
#include
<quark.h>
u64
quark_get_boottime(void);
quark_get_boottime returns the internal boottime epoch:
the wallclock time of boot in nanoseconds since the Unix epoch, as fetched
from the btime field of /proc/stat. btime has a
resolution of one second.
The epoch is fetched when the first queue is opened and refetched only by quark_update_boottime(3). It is what quark_time_to_wallclock(3) adds to a time since boot, exposed for users that prefer to do the translation themselves.
The boottime epoch in nanoseconds since the Unix epoch, zero if a queue was never opened.
quark_event_dump(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_time_to_wallclock(3), quark_update_boottime(3), quark(7), quark-btf(8), quark-mon(8), quark-test(8)
quark_get_boottime appeared in quark 0.8,
when all times handed out by quark switched from nanoseconds since the Unix
epoch to nanoseconds since boot.
| August 5, 2026 | Linux |