• Home
  • Raw
  • Download

Lines Matching refs:Instant

34 pub struct Instant {  struct
35 std: std::time::Instant, argument
38 impl Instant { impl
48 pub fn now() -> Instant { in now()
53 pub fn from_std(std: std::time::Instant) -> Instant { in from_std() argument
54 Instant { std } in from_std()
57 pub(crate) fn far_future() -> Instant { in far_future()
66 pub fn into_std(self) -> std::time::Instant { in into_std() argument
75 pub fn duration_since(&self, earlier: Instant) -> Duration { in duration_since()
96 pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration> { in checked_duration_since()
117 pub fn saturating_duration_since(&self, earlier: Instant) -> Duration { in saturating_duration_since()
143 Instant::now() - *self in elapsed()
149 pub fn checked_add(&self, duration: Duration) -> Option<Instant> { in checked_add() argument
150 self.std.checked_add(duration).map(Instant::from_std) in checked_add()
156 pub fn checked_sub(&self, duration: Duration) -> Option<Instant> { in checked_sub() argument
157 self.std.checked_sub(duration).map(Instant::from_std) in checked_sub()
161 impl From<std::time::Instant> for Instant { implementation
162 fn from(time: std::time::Instant) -> Instant { in from() argument
163 Instant::from_std(time) in from()
167 impl From<Instant> for std::time::Instant { implementation
168 fn from(time: Instant) -> std::time::Instant { in from() argument
173 impl ops::Add<Duration> for Instant { implementation
174 type Output = Instant;
176 fn add(self, other: Duration) -> Instant { in add() argument
177 Instant::from_std(self.std + other) in add()
181 impl ops::AddAssign<Duration> for Instant { implementation
187 impl ops::Sub for Instant { implementation
190 fn sub(self, rhs: Instant) -> Duration { in sub()
195 impl ops::Sub<Duration> for Instant { implementation
196 type Output = Instant;
198 fn sub(self, rhs: Duration) -> Instant { in sub() argument
199 Instant::from_std(self.std - rhs) in sub()
203 impl ops::SubAssign<Duration> for Instant { implementation
209 impl fmt::Debug for Instant { implementation
217 use super::Instant;
219 pub(super) fn now() -> Instant { in now()
220 Instant::from_std(std::time::Instant::now()) in now()
226 use super::Instant;
228 pub(super) fn now() -> Instant { in now()