Skip to content

Commit b7ba848

Browse files
committed
fix(console): add pretty format for 'last woken' time
Use consistent pretty format for 'last woken' time in task view. Closes tokio-rs#524
1 parent bdaf05e commit b7ba848

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tokio-console/src/view/task.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ impl TaskView {
204204
if let Some(since) = task.since_wake(now) {
205205
wakeups.reserve(3);
206206
wakeups.push(Span::raw(", "));
207-
wakeups.push(bold("last woken:"));
208-
wakeups.push(Span::from(format!(" {:?} ago", since)));
207+
wakeups.push(bold("last woken: "));
208+
wakeups.push(styles.time_units(since, view::DUR_LIST_PRECISION, None));
209+
wakeups.push(Span::raw(" ago"));
209210
}
210211

211212
waker_stats.push(Spans::from(wakeups));

0 commit comments

Comments
 (0)