Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

TimeDelta

Time duration with nanosecond precision.

This also allows for negative durations; see individual methods for details.

A TimeDelta is represented internally as a complement of seconds and nanoseconds. The range is restricted to that of i64 milliseconds, with the minimum value notably being set to -i64::MAX rather than allowing the full range of i64::MIN. This is to allow easy flipping of sign, so that for instance abs() can be called without any checks.

Fully qualified path: chrono::time_delta::TimeDelta

[derive(Clone, Copy, PartialEq, Drop)]
pub struct TimeDelta { /* private fields */ }