ktime_get_up..._offsets_now(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ktime_get_up..._offsets_now β€” Kernel API Manual

okay bestie, so this is ktime_get_update_offsets_now(9) from the Kernel API Manual, and she's a lil hrtimer helper πŸŽ€ β€” like, the name in the header is literally truncated with ... because it's too iconic to fit. let's get into it πŸ’–


✨ SYNOPSIS ✨

ktime_t ktime_get_update_offsets_now (u32 *cwsseq , ktime_t *offs_real ,
ktime_t *offs_boot , ktime_t *offs_tai );

look at her 😭 four pointers, one ktime_t return, zero notes. she's booked and busy.


🫢 ARGUMENTS 🫢

  • cwsseq β€” pointer to check and store the clock was set sequence number. literally "clock was set seq", iykyk.
  • offs_real β€” pointer to storage for the monotonic -> realtime offset.
  • offs_boot β€” pointer to storage for the monotonic -> boottime offset.
  • offs_tai β€” pointer to storage for the monotonic -> clock tai offset.

four pointers, no cap. she wants to know where you're storing stuff πŸ‘‘


🌸 DESCRIPTION 🌸

so what does she actually do? she returns the current monotonic time, and she updates those offsets β€” but only if the sequence number in cwsseq and timekeeper.clock_was_set_seq are different. like, vibe check first, updates second πŸ’…

not me comparing sequence numbers before doing anything β€” she's got boundaries.

and where's she called from? hrtimer_interrupt or retrigger_next_event. so yeah, she lives in the interrupt-y part of town 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, in the order the page gives them, no skips (we do not skip, periodt):

and the source she lives in? that's ./kernel/time/timekeeping.c 🧚


that's the whole page, bestie β€” every flag, every pointer, every one of those 44 see-alsos, all of it. slay ✨

signed off with love from ./kernel/time 🌈 datestamped October 2026 πŸ’œ β€” mwah, go read timekeeping.c πŸŽ€

πŸ“¦ where this page comes from