From 2bbe80c6f9d099c7823e524ba15e3458714a4d40 Mon Sep 17 00:00:00 2001 From: Yash Ladha Date: Thu, 3 Sep 2020 15:10:53 +0530 Subject: [PATCH] doc: added details around console.timeEnd changes Since PR https://github.com/nodejs/node/pull/29251 is merged into master, the implementation of `console.timeEnd` is not to print the milliseconds on the stdout but instead print a more readable time unit on the console. For example if the total time comes out to be 3456 milliseconds, it will be printed as 3.45 seconds so that it is much more readable and consistent. PR-URL: https://github.com/nodejs/node/pull/35027 Fixes: https://github.com/nodejs/node/issues/35011 Refs: https://github.com/nodejs/node/pull/29251 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca --- doc/api/console.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/console.md b/doc/api/console.md index 05c76af3c74020..470fd3c3fe9157 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -418,7 +418,8 @@ added: v0.1.104 Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. Use the same `label` when calling [`console.timeEnd()`][] to stop the timer and output the elapsed time in -milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond. +suitable time units to `stdout`. For example, if the elapsed +time is 3869ms, `console.timeEnd()` displays "3.869s". ### `console.timeEnd([label])`