__hrtimer_get_remaining(9)
π __hrtimer_get_remaining (9) β Kernel API Manual π
okay so bestie, this is a deep-dive into __hrtimer_get_remaining β it lives in the Kernel API Manual, section 9, and honestly? it's giving "small function, big feelings" π
β¨ NAME β¨
__hrtimer_get_remaining β get remaining time for the timer β³
Like, literally. It tells you how much time is left on a timer. That's the whole vibe. No cap. π«Ά
β¨ SYNOPSIS β¨
ktime_t __hrtimer_get_remaining (const struct hrtimer *timer , bool
adjust );
that's it, that's the whole signature π
writes out as a ktime_t, takes a const struct hrtimer *timer and a bool adjust β iconic, concise, no notes π₯
β¨ ARGUMENTS β¨
timerβ the timer to read πΈ like, hand me the timer and I'll tell you what's in it, bestieadjustβ adjust relative timers whenCONFIG_TIME_LOW_RES=yβοΈ lowkey important: this only does its little adjustment thing when that config is set, so don't come for her if nothing moves on your build π§
β¨ SEE ALSO β¨
first up, the kernel file: ./kernel/time/hrtimer.c β that's the main character's home address π π
and the whole friend group:
hrtimer_update_function(9)hrtimer_forward(9)hrtimer_start_range_ns(9)hrtimer_start_range_ns_user(9)hrtimer_try_to_cancel(9)hrtimer_cancel(9)hrtimer_get_next_event(9)hrtimer_next_event_without(9)hrtimer_setup(9)hrtimer_setup_on_stack(9)hrtimer_sleeper_start_expires(9)hrtimer_setup_sleeper_on_stack(9)
iykyk, it's a whole hrtimer cinematic universe πβ go read them, they ate ππ
bestie reminder: theadjustargument is doing real work tied toCONFIG_TIME_LOW_RES=yβ don't sleep on it π
and that's the tea π this page is brought to you by ./kernel/time, dated October 2026 β mwah, go touch a timer, ily, bye ππ¦β¨
π¦ 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