ktime_get_snapshot_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ktime_get_snapshot_id(9) ✨

okay so bestie, welcome to the Kernel API Manual 🫢 this one is from ktime_get_snapshot_id(9) and it is literally the "grab everything at once" of clock functions πŸ’…


🌸 NAME 🌸

ktime_get_snapshot_id β€” simultaneously snapshot a given clock ID together with the corresponding monotonic raw clock and the underlying clocksource counter value ⏱️✨ like, all at the same time, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

void ktime_get_snapshot_id (clockid_t clock_id , struct system_time_snapshot *systime_snapshot );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • clock_id β€” the clock ID you wanna snapshot πŸ‘‘ that's the one, babes.
  • systime_snapshot β€” pointer to the struct that's receiving the system time snapshot πŸ’– it's giving "here's your data, bestie".

πŸ’œ DESCRIPTION πŸ’œ

so for the system timekeeping clocks β€” that's REALTIME, MONOTONIC and BOOTTIME β€” the monotonic raw clock is CLOCK_MONOTONIC_RAW 🌈 iconic behaviour, honestly.

for AUX clocks, it's the monotonic raw clock that's related to the AUX clock. and these AUX-clock-related monotonic raw clocks have a strict linear offset to the system time CLOCK_MONOTONIC_RAW ✨ math time:

MONOTONIC_RAW(AUX$N) = CLOCK_MONOTONIC_RAW(system) + offset(AUX$N)

the offset gets established when an AUX clock is initialized πŸŽ€ but β€” and this is the part where we sigh β€” it is currently not accessible 😭 like the info is just vibing there behind the glass, not for us. πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

literally the whole timekeeping friend group, go say hi πŸ’…

alright bestie, that's the whole thing, mwah πŸ’‹ this page lives in ./kernel/time and the version vibes are dated October 2026 β€” until then, stay snapshotted, stay iconic πŸ‘‘πŸ’–

πŸ“¦ where this page comes from