Struct concordium_std::Timestamp [−][src]
#[repr(transparent)]pub struct Timestamp { /* fields omitted */ }
Expand description
Timestamp represented as milliseconds since unix epoch.
Timestamps from before January 1st 1970 at 00:00 are not supported.
Implementations
Construct timestamp from milliseconds since unix epoch.
Milliseconds since the UNIX epoch.
Add duration to the timestamp. Returns None
if the resulting timestamp
is not representable, i.e., too far in the future.
Subtract duration from the timestamp. Returns None
instead of
overflowing if the resulting timestamp would be before the Unix
epoch.
Compute the duration between the self and another timestamp. The duration is always positive, and is the difference between the the more recent timestamp and the one further in the past.
Compute duration since a given timestamp. Returns None
if given time
is in the future compared to self.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations
Mutably borrows from an owned value. Read more