STRUCT SYSTEM_TIME_SNAPSHOT(9)
π NAME
struct system_time_snapshot β bestie, it's a simultaneous time capture π«Ά like it grabs the monotonic raw time, a selected CLOCK_*, and the clocksource counter value all in one go, no cap.
β¨ SYNOPSIS β¨
struct system_time_snapshot {
u64 cycles;
u64 hw_cycles;
ktime_t systime;
ktime_t monoraw;
enum clocksource_ids cs_id;
enum clocksource_ids hw_csid;
u32 clock_was_set_seq;
u8 cs_was_changed_seq;
u8 valid;
};
π MEMBERS π
πΈ the member breakdown, iykyk
cyclesβ the clocksource counter value that's literally what produces the system times π«hw_cyclesβ for derived clocksources, this is the hardware counter value thatcycleswas derived from π¦systimeβ the system time of whicheverCLOCKID you selected πmonorawβ the monotonic raw system time βcs_idβ the clocksource ID, iconic, no notes πhw_csidβ the clocksource ID of the underlying hardware counter for derived clocksources that implement theread_snapshotcallback π₯clock_was_set_seqβ the sequence number of clock-was-set events π°οΈcs_was_changed_seqβ the sequence number of clocksource change events πvalidβ true if the snapshot is valid β like, the vibe check result fr fr
π DESCRIPTION π
Okay so monoraw is CLOCK_MONOTONIC_RAW for system time CLOCK ids. π«Ά
But for CLOCK_AUX$N clock ids, it's the monotonic raw time related to the AUX clock β which is CLOCK_MONOTONIC_RAW plus an AUX clock specific offset. π§ tiny little offset, big main character energy, you get it.
π SEE ALSO π
Kernel file ./include/linux/timekeeping.h and honestly the whole friend group:
ktime_get_real(9)ktime_get_boottime(9)ktime_get_clocktai(9)ktime_mono_to_real(9)ktime_get_ns(9)ktime_get_real_ns(9)ktime_get_boottime_ns(9)ktime_get_clocktai_ns(9)ktime_get_raw_ns(9)struct system_counterval_t(9)struct system_device_crosststamp(9)
ok that's the whole page bestie, go read the source, it's giving main character kernel file πβ¨
Lots of love from ./include/linux π β October 2026 edition, struct system_time_snapshot(9), 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