pub struct Rtc { /* private fields */ }
Expand description
The System Real Time Clock structure for x86 based on CMOS.
Implementations§
Source§impl Rtc
impl Rtc
Sourcepub fn get_unix_timestamp(&self) -> u64
pub fn get_unix_timestamp(&self) -> u64
Returns the current time in seconds since UNIX epoch.
Note: The call to this RTC method requires the interrupt to be disabled, otherwise the value read may be inaccurate.
Sourcepub fn set_unix_timestamp(&self, unix_time: u64)
pub fn set_unix_timestamp(&self, unix_time: u64)
Sets the current time in seconds since UNIX epoch.
Auto Trait Implementations§
impl Freeze for Rtc
impl RefUnwindSafe for Rtc
impl Send for Rtc
impl Sync for Rtc
impl Unpin for Rtc
impl UnwindSafe for Rtc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more