pub struct SystemTimeSource;Expand description
System time source using std::time::SystemTime
This is the default time source for development and testing environments
where the system clock is trusted. On embedded devices, prefer using
BuildTimeSource or a custom implementation with RTC/GPS.
§Reliability
Always reports as reliable since SystemTime::now() should succeed
on platforms with std. However, the system clock may be wrong if
not synced with NTP.
Trait Implementations§
Source§impl Clone for SystemTimeSource
impl Clone for SystemTimeSource
Source§fn clone(&self) -> SystemTimeSource
fn clone(&self) -> SystemTimeSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemTimeSource
impl Debug for SystemTimeSource
Source§impl Default for SystemTimeSource
impl Default for SystemTimeSource
Source§fn default() -> SystemTimeSource
fn default() -> SystemTimeSource
Returns the “default value” for a type. Read more
Source§impl TimeSource for SystemTimeSource
impl TimeSource for SystemTimeSource
Source§fn minimum_time(&self) -> SystemTime
fn minimum_time(&self) -> SystemTime
Get the minimum possible time (lower bound). Read more
Source§fn is_reliable(&self) -> bool
fn is_reliable(&self) -> bool
Check if this time source is considered reliable. Read more
Source§fn now_unix(&self) -> Result<u64, WSError>
fn now_unix(&self) -> Result<u64, WSError>
Get current time as Unix timestamp (seconds since epoch).
Source§fn minimum_unix(&self) -> u64
fn minimum_unix(&self) -> u64
Get minimum time as Unix timestamp.
impl Copy for SystemTimeSource
Auto Trait Implementations§
impl Freeze for SystemTimeSource
impl RefUnwindSafe for SystemTimeSource
impl Send for SystemTimeSource
impl Sync for SystemTimeSource
impl Unpin for SystemTimeSource
impl UnwindSafe for SystemTimeSource
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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