From dbcfcdae89d06d69fb034ddf0bc2086c566c7e61 Mon Sep 17 00:00:00 2001 From: pwygab <88221256+merelymyself@users.noreply.github.com> Date: Sun, 19 Jun 2022 12:44:46 +0800 Subject: [PATCH] calculates history duration properly (#5827) --- crates/nu-command/src/misc/history.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/misc/history.rs b/crates/nu-command/src/misc/history.rs index d38099e47c..41c303af03 100644 --- a/crates/nu-command/src/misc/history.rs +++ b/crates/nu-command/src/misc/history.rs @@ -178,7 +178,7 @@ impl Command for History { }, Value::Duration { val: match entry.duration { - Some(d) => d.as_millis().try_into().unwrap_or(0), + Some(d) => d.as_nanos().try_into().unwrap_or(0), None => 0, }, span: head,