ktime_get_ts64(9)
β¨ ktime_get_ts64 β¨
<sub>the manual page, but make it make sense β from the Linux Kernel API Manual, bestie π«Ά</sub>
πΈ NAME πΈ
ktime_get_ts64 β get the monotonic clock in timespec64 format
π SYNOPSIS π
void ktime_get_ts64 (struct timespec64 *ts );
π¦ ARGUMENTS π¦
tsβ bestie, this is a pointer to atimespecvariable. it's where the result goes. that's it. that's the whole vibe. π
π DESCRIPTION π
Okay so picture this: the function calculates the monotonic clock from the realtime clock and the wall_to_monotonic offset β¨ and then stores the result in normalized timespec64 format in the variable that ts is pointing at. like, it does the math, it normalizes it, it drops it in the box. the way that works is honestly iconic. no cap. π
quick reminder:tsis a pointer to atimespec64variable β you're not passing the struct, you're passing the address of it. so, lowkey, make sure it's valid or it's a whole situation π
π SEE ALSO π
fr fr, if you liked this one, the whole timekeeping friend group is right here β go say hi ππ
- Kernel file
./kernel/time/timekeeping.cand thestruct 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_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)read_persistent_wall_and_boot_offset(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)
And that's the whole page, bestie π
β¨ This little gem lives in the ./kernel/time source tree, dated October 2026, and it's officially the ktime_get_ts64(9) kernel API manual page. go forth and normalize those timespecs ππ¦π
π¦ 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