Lines Matching refs:Instant
68 pub struct Instant { struct
73 impl Instant { impl
74 pub const ZERO: Instant = Instant::from_micros_const(0);
77 pub fn from_micros<T: Into<i64>>(micros: T) -> Instant { in from_micros() argument
78 Instant { in from_micros()
83 pub const fn from_micros_const(micros: i64) -> Instant { in from_micros_const() argument
84 Instant { micros } in from_micros_const()
88 pub fn from_millis<T: Into<i64>>(millis: T) -> Instant { in from_millis() argument
89 Instant { in from_millis()
95 pub const fn from_millis_const(millis: i64) -> Instant { in from_millis_const() argument
96 Instant { in from_millis_const()
102 pub fn from_secs<T: Into<i64>>(secs: T) -> Instant { in from_secs() argument
103 Instant { in from_secs()
109 pub fn now() -> Instant { in now()
143 impl fmt::Display for Instant { implementation
149 impl ops::Add<Duration> for Instant { implementation
150 type Output = Instant;
152 fn add(self, rhs: Duration) -> Instant { in add() argument
153 Instant::from_micros(self.micros + rhs.total_micros() as i64) in add()
157 impl ops::AddAssign<Duration> for Instant { implementation
163 impl ops::Sub<Duration> for Instant { implementation
164 type Output = Instant;
166 fn sub(self, rhs: Duration) -> Instant { in sub() argument
167 Instant::from_micros(self.micros - rhs.total_micros() as i64) in sub()
171 impl ops::SubAssign<Duration> for Instant { implementation
177 impl ops::Sub<Instant> for Instant { implementation
180 fn sub(self, rhs: Instant) -> Duration { in sub()
349 impl From<smoltcp::time::Instant> for Instant { implementation
350 fn from(val: smoltcp::time::Instant) -> Self { in from()
351 Instant::from_micros(val.micros()) in from()
355 impl Into<smoltcp::time::Instant> for Instant { implementation
356 fn into(self) -> smoltcp::time::Instant { in into() argument
357 smoltcp::time::Instant::from_millis(self.millis()) in into()