Lines Matching defs:Instant
10 //! - The [`Instant`] type represents a specific point in time.
16 //! A [`Instant`] object can be created by calling the [`Instant::now()`] function.
18 //! By calling the [`Instant::elapsed()`] method, a [`Delta`] object representing
20 //! by subtracting two [`Instant`] objects.
169 pub struct Instant<C: ClockSource> {
174 impl<C: ClockSource> Clone for Instant<C> {
180 impl<C: ClockSource> Copy for Instant<C> {}
182 impl<C: ClockSource> Instant<C> {
194 /// Return the amount of time elapsed since the [`Instant`].
205 /// Create an [`Instant`] from a `ktime_t` without checking if it is non-negative.
228 impl<C: ClockSource> ops::Sub for Instant<C> {
233 fn sub(self, other: Instant<C>) -> Delta {
240 impl<T: ClockSource> ops::Add<Delta> for Instant<T> {
260 impl<T: ClockSource> ops::Sub<Delta> for Instant<T> {