read_persist..._boot_offset(9)
hey bestie π welcome to the read_persist..._boot_offset(9) page from the Kernel API Manual β it's lowkey a tiny one, but it's still serving timekeeping realness β¨
π NAME π
read_persistent_wall_and_boot_offset β reads the persistent clock, and also gives you the offset from the boot. no cap, that's the whole name description π
β¨ SYNOPSIS β¨
void read_persistent_wall_and_boot_offset (struct timespec64 *wall_time
, struct timespec64 *boot_offset );
π ARGUMENTS π
wall_timeβ current time as returned by persistent clock. yes, that persistent clock πboot_offsetβ offset that is defined aswall_time - boot_time. literally the math, bestie π§
π¦ DESCRIPTION π¦
okay so this is a weak dummy function for arches that do not yet support it. it's not trying to be the main character on those arches yet, and that's valid π«Ά
the default function calculates offset based on the current value of local_clock. the way that works: architectures that support sched_clock but don't support a dedicated boot time clock will provide the best estimate of the boot time. slay for a best-estimate situation β¨
π SEE ALSO π
Kernel file to check: ./kernel/time/timekeeping.c. and the SEE ALSO besties are:
struct tk_fast(9)tk_setup_internals(9)update_fast_timekeeper(9)ktime_get_mono_fast_ns(9)ktime_get_raw_fast_ns(9)ktime_get_boot_fast_ns(9)ktime_get_tai_fast_ns(9)ktime_get_real_fast_ns(9)halt_fast_timekeeper(9)pvclock_gtod_register_notifier(9)pvclock_gtod_unregister_notifier(9)timekeeping_forward_now(9)ktime_get_real_ts64(9)ktime_mono_to_any(9)ktime_get_raw(9)ktime_get_ts64(9)ktime_get_seconds(9)ktime_get_real_seconds(9)__ktime_get_real_seconds(9)ktime_get_snapshot_id(9)adjust_historical_crosststamp(9)ktime_real_to_base_clock(9)get_device_system_crosststamp(9)timekeeping_clocksource_has_base(9)do_settimeofday64(9)__timekeeping_inject_offset(9)timekeeping_notify(9)ktime_get_raw_ts64(9)timekeeping_valid_for_hres(9)timekeeping_max_deferment(9)read_persistent_clock64(9)__timekeeping_inject_sleeptime(9)timekeeping_inject_sleeptime64(9)timekeeping_resume(9)update_wall_time(9)getboottime64(9)ktime_get_coarse_real_ts64_mg(9)ktime_get_real_ts64_mg(9)ktime_get_update_offsets_now(9)random_get_entropy_fallback(9)do_adjtimex(9)hardpps(9)ktime_get_aux(9)ktime_get_aux_ts64(9)
mwah π source/version sign-off: this page is from ./kernel/time, dated October 2026, and it's still serving read_persist..._boot_offset(9) realness. periodt π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms