ktime_get_real_ns(9)
β¨ ktime_get_real_ns β¨
okay so bestie, welcome to the Kernel API Manual β this one's a tiny lil legend from ./include/linux/timekeeping.h and honestly she's iconic π
πΈ NAME πΈ
ktime_get_real_ns β grab the current real / wall time, but in nanoseconds π°οΈβ¨
π¦ SYNOPSIS π¦
u64 ktime_get_real_ns (void );
π ARGUMENTS π
voidβ no arguments, none, zero, nada π«Ά she takes nothing and gives you everything (a nanosecond count)
π RETURN π
the current real time, converted to nanoseconds. that's it. that's the whole vibe. go off π
π SEE ALSO π
- Kernel file
./include/linux/timekeeping.hβ the mothership, the source, the origin story π§ ktime_get_real(9)ktime_get_boottime(9)ktime_get_clocktai(9)ktime_mono_to_real(9)ktime_get_ns(9)ktime_get_boottime_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)
ngl the whole clock family is right there in the see-also list β pick your fave, they're all slaying in their own lane π no cap, read them all before you commit to one.
and that's the page, bestie π fr fr you're now certified in real-time nanoseconds. mwah π
./include/linux Β· October 2026 Β· Kernel API Manual β ty for reading, ily, see u in the next page πΈπ¦π
π¦ 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