`impl Format for core::time::Duration`
-#[cfg(feature = "unstable-test")]
use crate as defmt;
use defmt_macros::internp;
@@ -458,3 +457,14 @@ impl Format for core::convert::Infallible {
match *self {}
}
}
+
+impl Format for core::time::Duration {
+ fn format(&self, fmt: Formatter) {
+ crate::write!(
+ fmt,
+ "Duration {{ secs: {=u64}, nanos: {=u32} }}",
+ self.as_secs(),
+ self.subsec_nanos(),
+ )
+ }
+}
