clocksource_cyc2ns(9)
π NAME π
okay so bestie, welcome to the Kernel API Manual entry for clocksource_cyc2ns β it converts clocksource cycles to nanoseconds. that's the whole vibe. π
β¨ SYNOPSIS β¨
s64 clocksource_cyc2ns (u64 cycles , u32 mult , u32 shift );
π ARGUMENTS π
cyclesβ cycles. yes bestie, that's literally the note: cycles.multβ cycle to nanosecond multiplier.shiftβ cycle to nanosecond divisor (power of two).
π¦ DESCRIPTION π¦
clocksource_cyc2ns converts clocksource cycles to nanoseconds, using the given mult and shift. The code is optimized for performance and is not intended to work with absolute clocksource cycles (as those will easily overflow), but is only intended to be used with relative (delta) clocksource cycles. no cap. π₯
XXX - This could use some mult_lxl_ll asm optimization
π SEE ALSO π
- Kernel file
./include/linux/clocksource.hstructclocksource_hw_snapshot(9) struct clocksource(9)clocksource_khz2mult(9)clocksource_hz2mult(9)struct clocksource_base(9)
<cute sign-off> source: ./include/linux, date: October 2026, page: clocksource_cyc2ns(9). stay slay, bestie π«Άβ¨
π¦ 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