-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make docs for console.time and console.timeEnd more complete #198
Conversation
@@ -64,11 +64,13 @@ Defaults to `false`. Colors are customizable, see below. | |||
|
|||
## console.time(label) | |||
|
|||
Mark a time. | |||
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 miliseconds, just call the `console.timeEnd()` method, again passing the timer's name as the parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap to 80 colums, but otherwise looks much improved.
Looks good to me, the existing docs were pretty lacking, but can you squash the two commits and wrap to 80 columns? |
This PR has been updated to squash previous commits and wrap at 80 lines as requested. |
@markstos LGTM but can you make the commit log conform to what is outlined in CONTRIBUTING.md? Be as descriptive as possible in the first line; 'more complete' is too unspecific. Bonus points if you turn the references into links. It works like this:
Where you pluck |
`console.time()` and `console.timeEnd()` are very closely related. It's useful to reference them both from each other. Previously, console.time() did not mention that it needed to be paired with a call to console.timeEnd() to be useful, and timeEnd() also failed to mention that console.time() needed to be called first. References in both directions have been added.
Ben, I've reformatted the commit message as requested and added the links as On Tue, Dec 23, 2014 at 10:03 AM, Ben Noordhuis [email protected]
|
`console.time()` and `console.timeEnd()` are very closely related. It's useful to reference them both from each other. Previously, console.time() did not mention that it needed to be paired with a call to console.timeEnd() to be useful, and timeEnd() also failed to mention that console.time() needed to be called first. References in both directions have been added. PR-URL: #198 Reviewed-By: Ben Noordhuis <[email protected]>
Landed in 6af9483, thanks Mark! I reworded the first line to fit in 50 characters. |
@nodejs/build ... any explanation why we're getting CI runs on old PRs? This is at least the second one I've seen today. |
@jasnell It's the CI's being started for the security releases and is kind of related to https://github.com/nodejs/github-bot/issues/245 (in that the build jobs are always passing |
Oy, that's not great. Ok, thanks for the explanation :) |
* Update GetForegroundTaskRunner override * Fix line ending --------- Co-authored-by: Etienne Pierre-doray <[email protected]>
console.time()
andconsole.timeEnd()
are very closely related. It's useful to reference them both from each other.