Skip to content

Commit 05b7fc8

Browse files
committed
fix: Uptime is too precise, change nanos to micros
1 parent 961c6f7 commit 05b7fc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl From<std::time::Instant> for Uptime {
8181
impl FormatTime for Uptime {
8282
fn format_time(&self, w: &mut impl std::fmt::Write) -> std::fmt::Result {
8383
let e = self.epoch.elapsed();
84-
write!(w, "{:4}.{:09}s", e.as_secs(), e.subsec_nanos())
84+
write!(w, "{:4}.{:06}s", e.as_secs(), e.subsec_micros())
8585
}
8686
}
8787

0 commit comments

Comments
 (0)