From fca9857189f9e76886cf1b545e2ed51dc730e83b Mon Sep 17 00:00:00 2001 From: ExplodingWaffle Date: Sat, 25 Jun 2022 18:46:16 +0100 Subject: [PATCH] Add const ZERO for use in statics --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 99d1d9b..1ab30f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,6 +29,9 @@ pub trait Monotonic { /// extending a 16 bit timer to 32/64 bits, even if there are no scheduled tasks. const DISABLE_INTERRUPT_ON_EMPTY_QUEUE: bool = true; + /// The time at time zero. Can be used in statics, unlike the [zero()](crate::Monotonic::zero) function. + const ZERO: Self::Instant; + /// The type for instant, defining an instant in time. /// /// **Note:** In all APIs in RTIC that use instants from this monotonic, this type will be used.