Skip to content

undocumented console.timeEnd() change in 6.x #6452

Closed
@ben-page

Description

@ben-page
  • Version: v6.0.0
  • Platform: Windows 10 x64
  • Subsystem: console

_Description_
On node < 6 you could call timeEnd() multiple times for the same label to receive the current elapsed time. This no longer works in node v6.

This is a side effect of this pull request #3562, which fixed timers being leaked. This change completely makes sense, but it also removes (probably unintended) functionality. Should this change be in the documentation?

_Example_

console.time('timer');
setTimeout(function() {
    console.timeEnd('timer');
}, 10);
setTimeout(function() {
    console.timeEnd('timer');
}, 20);

output on node v5.9.1

timer: 11.898ms
timer: 20.454ms

output on node v6.0.0

timer: 11.111ms
(node:33232) Warning: No such label 'timer' for console.timeEnd()

Metadata

Metadata

Assignees

Labels

consoleIssues and PRs related to the console subsystem.docIssues and PRs related to the documentations.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions