Lines Matching refs:rhs

103     fn sub(self, rhs: Self) -> Self::Output {  in sub()
104 let sec = self.tv_sec.checked_sub(rhs.tv_sec).unwrap_or(0); in sub()
105 let nsec = self.tv_nsec.checked_sub(rhs.tv_nsec).unwrap_or(0); in sub()
284 fn add(self, rhs: Duration) -> Instant { in add()
285 Instant::from_micros(self.micros + rhs.total_micros() as i64) in add()
290 fn add_assign(&mut self, rhs: Duration) { in add_assign()
291 self.micros += rhs.total_micros() as i64; in add_assign()
298 fn sub(self, rhs: Duration) -> Instant { in sub()
299 Instant::from_micros(self.micros - rhs.total_micros() as i64) in sub()
304 fn sub_assign(&mut self, rhs: Duration) { in sub_assign()
305 self.micros -= rhs.total_micros() as i64; in sub_assign()
312 fn sub(self, rhs: Instant) -> Duration { in sub()
313 Duration::from_micros((self.micros - rhs.micros).unsigned_abs()) in sub()
379 fn add(self, rhs: Duration) -> Duration { in add()
380 Duration::from_micros(self.micros + rhs.total_micros()) in add()
385 fn add_assign(&mut self, rhs: Duration) { in add_assign()
386 self.micros += rhs.total_micros(); in add_assign()
393 fn sub(self, rhs: Duration) -> Duration { in sub()
396 .checked_sub(rhs.total_micros()) in sub()
403 fn sub_assign(&mut self, rhs: Duration) { in sub_assign()
406 .checked_sub(rhs.total_micros()) in sub_assign()
414 fn mul(self, rhs: u32) -> Duration { in mul()
415 Duration::from_micros(self.micros * rhs as u64) in mul()
420 fn mul_assign(&mut self, rhs: u32) { in mul_assign()
421 self.micros *= rhs as u64; in mul_assign()
428 fn div(self, rhs: u32) -> Duration { in div()
429 Duration::from_micros(self.micros / rhs as u64) in div()
434 fn div_assign(&mut self, rhs: u32) { in div_assign()
435 self.micros /= rhs as u64; in div_assign()
442 fn shl(self, rhs: u32) -> Duration { in shl()
443 Duration::from_micros(self.micros << rhs) in shl()
448 fn shl_assign(&mut self, rhs: u32) { in shl_assign()
449 self.micros <<= rhs; in shl_assign()
456 fn shr(self, rhs: u32) -> Duration { in shr()
457 Duration::from_micros(self.micros >> rhs) in shr()
462 fn shr_assign(&mut self, rhs: u32) { in shr_assign()
463 self.micros >>= rhs; in shr_assign()