mirror of https://github.com/nodejs/node.git
doc: reword description of console.time
PR-URL: https://github.com/nodejs/node/pull/3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>pull/3166/head
parent
419f7d4726
commit
fc72a578e6
|
@ -74,16 +74,16 @@ Defaults to `false`. Colors are customizable, see below.
|
|||
|
||||
### console.time(label)
|
||||
|
||||
Used to calculate the duration of a specific operation. To start a timer, call
|
||||
the `console.time()` method, giving it a name as only parameter. To stop the
|
||||
timer, and to get the elapsed time in milliseconds, just call the
|
||||
[`console.timeEnd()`](#console_console_timeend_label) method, again passing the
|
||||
timer's name as the parameter.
|
||||
Starts a timer that can be used to compute the duration of an operation. Timers
|
||||
are identified by a unique name. Use the same name when you call
|
||||
[`console.timeEnd()`](#console_console_timeend_label) to stop the timer and
|
||||
output the elapsed time in milliseconds. Timer durations are accurate to the
|
||||
sub-millisecond.
|
||||
|
||||
### console.timeEnd(label)
|
||||
|
||||
Stops a timer that was previously started by calling
|
||||
[`console.time()`](#console_console_time_label) and print the result to the
|
||||
[`console.time()`](#console_console_time_label) and prints the result to the
|
||||
console.
|
||||
|
||||
Example:
|
||||
|
|
Loading…
Reference in New Issue