clocksource_cyc2ns(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌈


<cute sign-off> source: ./include/linux, date: October 2026, page: clocksource_cyc2ns(9). stay slay, bestie 🫢✨

πŸ“¦ where this page comes from