pub struct Time {
pub value_ns: f64,
}Fields§
§value_ns: f64Implementations§
Source§impl Time
impl Time
pub const MICRO_TO_NANO: f64 = 1000f64
pub const MILLI_TO_NANO: f64 = 1.0E+6f64
pub const SECS_TO_NANO: f64 = 1.0E+9f64
pub fn zero() -> Self
pub fn one() -> Self
pub fn nanos(time_ns: f64) -> Self
pub fn micros(time_us: f64) -> Self
pub fn millis(time_ms: f64) -> Self
pub fn secs(time_s: f64) -> Self
pub fn as_nanos(&self) -> f64
pub fn as_micros(&self) -> f64
pub fn as_millis(&self) -> f64
pub fn as_secs(&self) -> f64
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn round(self) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Time
impl<'de> Deserialize<'de> for Time
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Time
impl Ord for Time
Source§impl PartialOrd for Time
impl PartialOrd for Time
impl Copy for Time
impl Eq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
Blanket Implementations§
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