Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYash Ladha <yashladhapankajladha123@gmail.com>2020-09-03 12:40:53 +0300
committerLuigi Pinca <luigipinca@gmail.com>2020-10-03 21:36:43 +0300
commit6139e58fcb1269ff411299ba7b2b67363b262ff3 (patch)
tree3bad2636bc1a9504c4861af2d223eabe2a358dcc
parentfdf0a84e826d3a9ec0ce6f5a3f5adc967fe99408 (diff)
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 <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-rw-r--r--doc/api/console.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/console.md b/doc/api/console.md
index 05c76af3c74..470fd3c3fe9 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])`
<!-- YAML