read_persist..._boot_offset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 as wall_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:

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