Lines Matching full:delta
11 //! - The [`Delta`] type represents a span of time.
18 //! By calling the [`Instant::elapsed()`] method, a [`Delta`] object representing
19 //! the elapsed time can be created. The [`Delta`] object can also be created
22 //! A [`Delta`] type supports methods to retrieve the duration in various units.
210 pub fn elapsed(&self) -> Delta {
243 type Output = Delta;
247 fn sub(self, other: Instant<C>) -> Delta {
248 Delta {
254 impl<T: ClockSource> ops::Add<Delta> for Instant<T> {
258 fn add(self, rhs: Delta) -> Self::Output {
274 impl<T: ClockSource> ops::Sub<Delta> for Instant<T> {
278 fn sub(self, rhs: Delta) -> Self::Output {
300 pub struct Delta {
304 impl ops::Add for Delta {
315 impl ops::AddAssign for Delta {
322 impl ops::Sub for Delta {
333 impl ops::SubAssign for Delta {
340 impl ops::Mul<i64> for Delta {
351 impl ops::MulAssign<i64> for Delta {
358 impl ops::Div for Delta {
376 impl Delta {
380 /// Create a new [`Delta`] from a number of nanoseconds.
386 /// Create a new [`Delta`] from a number of microseconds.
398 /// Create a new [`Delta`] from a number of milliseconds.
410 /// Create a new [`Delta`] from a number of seconds.
422 /// Return `true` if the [`Delta`] spans no time.
428 /// Return `true` if the [`Delta`] spans a negative amount of time.
434 /// Return the number of nanoseconds in the [`Delta`].
441 /// to the value in the [`Delta`].
456 /// Return the number of milliseconds in the [`Delta`].