ktime_real_to_base_clock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ktime_real_to_base_clock(9) β€” Kernel API Manual glow-up πŸ’…

okay so bestie, welcome to the ktime_real_to_base_clock(9) page from the Kernel API Manual. This is the lil function that handles one very specific time conversion, and we're gonna get into it. 🫢


🌸 NAME 🌸

ktime_real_to_base_clock β€” Convert CLOCK_REALTIME timestamp to a base clock timestamp. That's the assignment, no cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

the whole call looks like this, character for character:

bool ktime_real_to_base_clock (ktime_t treal , enum clocksource_ids base_id , u64 *cycles );

πŸŽ€ ARGUMENTS πŸŽ€

  • treal β€” the CLOCK_REALTIME timestamp to convert. πŸ’–
  • base_id β€” the base clocksource id. πŸ‘‘
  • cycles β€” a pointer to store the converted base clock timestamp. πŸ“

✨ DESCRIPTION ✨

Converts a supplied, future realtime clock value to the corresponding base clock value. That's it, that's the vibe β€” future realtime clock value in, corresponding base clock value out. πŸ’«


πŸ”₯ RETURN πŸ”₯

It gives you true if the conversion is successful, and false otherwise. Periodt. πŸ’…


🌈 SEE ALSO 🌈

y'all know the drill β€” peep the kernel file ./kernel/time/timekeeping.c and these related pages, all iconic, all linked:


big cozy sign-off: this page is chillin' in ./kernel/time, dated October 2026, from the Kernel API Manual β€” xoxo, stay timestamped bestie πŸ’–πŸŽ€

πŸ“¦ where this page comes from