Skip to content

Commit

Permalink
doc: added details around console.timeEnd changes
Browse files Browse the repository at this point in the history
Since PR nodejs#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: nodejs#35027
Fixes: nodejs#35011
Refs: nodejs#29251
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
yashLadha authored and joesepi committed Oct 22, 2020
1 parent e038f2a commit 2bbe80c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bbe80c

Please sign in to comment.