Browse Source

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>
v5.x
Michaël Zasso 10 years ago
committed by Rod Vagg
parent
commit
f6ebc8277b
  1. 12
      doc/api/console.markdown

12
doc/api/console.markdown

@ -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…
Cancel
Save