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
Michaël Zasso 2015-10-07 20:01:36 +02:00
parent 419f7d4726
commit fc72a578e6
1 changed files with 6 additions and 6 deletions

View File

@ -74,16 +74,16 @@ Defaults to `false`. Colors are customizable, see below.
### console.time(label) ### console.time(label)
Used to calculate the duration of a specific operation. To start a timer, call Starts a timer that can be used to compute the duration of an operation. Timers
the `console.time()` method, giving it a name as only parameter. To stop the are identified by a unique name. Use the same name when you call
timer, and to get the elapsed time in milliseconds, just call the [`console.timeEnd()`](#console_console_timeend_label) to stop the timer and
[`console.timeEnd()`](#console_console_timeend_label) method, again passing the output the elapsed time in milliseconds. Timer durations are accurate to the
timer's name as the parameter. sub-millisecond.
### console.timeEnd(label) ### console.timeEnd(label)
Stops a timer that was previously started by calling 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. console.
Example: Example: