#[repr(C)]pub struct RtcTime {
pub tm_sec: i32,
pub tm_min: i32,
pub tm_hour: i32,
pub tm_mday: i32,
pub tm_mon: i32,
pub tm_year: i32,
pub tm_wday: i32,
pub tm_yday: i32,
pub tm_isdst: i32,
}Expand description
RTC 时间结构体(对应 Linux struct rtc_time)
参考:include/uapi/linux/rtc.h
Fields§
§tm_sec: i32秒 (0-59)
tm_min: i32分 (0-59)
tm_hour: i32时 (0-23)
tm_mday: i32日 (1-31)
tm_mon: i32月 (0-11, 注意是 0-based)
tm_year: i32年份 - 1900
tm_wday: i32星期 (0-6, 0=Sunday)
tm_yday: i32年内第几天 (0-365)
tm_isdst: i32夏令时标志
Trait Implementations§
impl Copy for RtcTime
Auto Trait Implementations§
impl Freeze for RtcTime
impl RefUnwindSafe for RtcTime
impl Send for RtcTime
impl Sync for RtcTime
impl Unpin for RtcTime
impl UnwindSafe for RtcTime
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)