-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Description
- Version:4.2.1, 5.9.0, 6.0.0
- Platform: macos
- Subsystem:
var startTime = +new Date()
while ((new Date - startTime) < 1000) {}
setTimeout(function () {
var startTime = +new Date()
while ((new Date - startTime) < 3000) {}
var t1= new Date
setTimeout(function () {
console.log(new Date - t1, 'new Date - t1') // !!!!!!!!!!diff is 3000+, should be 20+
}, 20)
}, 20)
timediff should be 20+ms, but it would equal to the while block time.
Metadata
Metadata
Assignees
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.