ktime_get_boottime_ns(9)
π ktime_get_boottime_ns(9)
okay so welcome to the Kernel API Manual bestie, today's main character is ktime_get_boottime_ns β the function that tells you how long it's been since boot, in nanoseconds. yes, nanoseconds. she's precise. periodt. β¨
πΈ NAME πΈ
ktime_get_boottime_ns β get the monotonic time since boot in nanoseconds π
π SYNOPSIS π
u64 ktime_get_boottime_ns (void );
like, that's the whole vibe. returns a u64, takes nothing. no cap. π
π¦ ARGUMENTS π¦
voidβ no arguments, bestie. it literally needs nothing from you. she's low maintenance like that. π
β¨ RETURN β¨
the current boottime converted to nanoseconds β
that's it, that's the return value. a u64 full of nanoseconds since boot. iconic behavior honestly. π
π SEE ALSO π
- the kernel file is
./include/linux/timekeeping.hβ that's where she lives, iykyk π§ 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_clocktai_ns(9)ktime_get_raw_ns(9)struct system_time_snapshot(9)struct system_counterval_t(9)struct system_device_crosststamp(9)
like a whole friend group of time functions fr fr π«Ά go say hi to all of them.
ngl if you're doing timing stuff in the kernel, read the whole timekeeping.h file β she's got lore and it's all documented. π
anyway that's the page!! tysm for reading, mwah π
source path: ./include/linux Β· version date: October 2026 Β· and yes we're still shipping ktime_get_boottime_ns(9) in this economy π
β¨
π¦ 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