Skip to content

Commit fa77852

Browse files
committed
feat(common): TracingTimer uses the Debug impl of Duration.
This changes the `TracingTimer` message to use the `Debug` impl of `Duration` instead of displaying it as milliseconds. It can help spotting seconds without counting all the digits.
1 parent 7b73311 commit fa77852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/matrix-sdk-common/src/tracing_timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl std::fmt::Debug for TracingTimer {
3333

3434
impl Drop for TracingTimer {
3535
fn drop(&mut self) {
36-
let message = format!("{} finished in {}ms", self.id, self.start.elapsed().as_millis());
36+
let message = format!("`{}` finished in {:?}", self.id, self.start.elapsed());
3737

3838
let enabled = tracing::level_enabled!(self.level) && {
3939
let interest = self.callsite.interest();

0 commit comments

Comments
 (0)