mc146818_get_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mc146818_get_time(9) πŸ’…

hiii bestie 🫢 welcome to the Kernel API Manual!!! This is the page for mc146818_get_time, and it’s literally about getting the current time from the RTC. Not me being obsessed with a clock, but here we are. ✨


🌸 NAME 🌸

  • mc146818_get_time β€” Get the current time from the RTC.

✨ SYNOPSIS ✨

okay so the signature is right here, character for character, no cap:

int mc146818_get_time (struct rtc_time *time , int timeout );

πŸŽ€ ARGUMENTS πŸŽ€

  • time β€” pointer to struct rtc_time to store the current time.
  • timeout β€” timeout value in ms.

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this function reads the current time from the RTC and stores it in the provided struct rtc_time. That’s the whole vibe. The timeout parameter specifies the maximum time to wait for the RTC to become ready. Like, give the RTC a sec to get its life together, but only up to timeout ms. ⏳

πŸ”₯ RETURN πŸ”₯

  • 0 on success. slay. πŸ‘‘
  • -ETIMEDOUT if the RTC did not become ready within the specified timeout. oopβ€”timeout behavior, bestie.
  • or another error code if an error occurred. iykyk, errors happen. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/rtc/rtc-mc146818-lib.c β€” go read the source, it’s right there. πŸ“–βœ¨

xoxo πŸ’– this page is from the ./drivers/rtc source, dated October 2026, and it’s all mc146818_get_time(9) energy. mwah πŸ’‹

πŸ“¦ where this page comes from