Struct hwclock::HwClockDev
[−]
[src]
pub struct HwClockDev { /* fields omitted */ }
Hardware clock
Wraps an open hardware clock, usually found at /dev/rtc
or /dev/rtc0
.
Methods
impl HwClockDev
[src]
fn open<P: AsRef<Path>>(dev: P) -> Result<HwClockDev>
[src]
Open clock
The device node will be held open until the HwClockDev
is dropped
fn get_time(&self) -> Result<RtcTime, Error>
[src]
Get hardware clocks time
fn set_time(&self, time: &RtcTime) -> Result<(), Error>
[src]
Set hardware clocks time