pub struct Timestamp {}
Expand description
Timestamp Utility
Provides functions to all timestamp related operations.
Timestamps are u64 numbers containing the milliseconds since UNIX_EPOCH
Implementations
sourceimpl Timestamp
impl Timestamp
pub fn create_time() -> SystemTime
pub fn get_timestamp_by(time: &SystemTime) -> u64
sourcepub fn get_timestamp() -> u64
pub fn get_timestamp() -> u64
get a timestamp since UNIX_EPOCH in milliseconds for now
The function should never panick. If it fails it returns the timestamp 1 hour after zero ( == 360’000 milliseconds ).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more