Skip to content

setTimeout eating CPU time and doing infinity stuck with non-whole delay #24897

Closed
@SaltyMonkey

Description

@SaltyMonkey
  • Version: 11.3.0
  • Platform: Windows (possible affected another platforms too)
  • Subsystem: Timers

setTimeout eating CPU and cant fire if delay is non-whole number.

Can be easily reproduced even from node-cli:

setTimeout(()=>{console.log("timeout fired!")}, 880.0000000000001)

Working example:

setTimeout(()=>{console.log("timeout fired!")}, Math.round(880.0000000000001))

Possible related issue from past: nodejs/node-v0.x-archive#8065

Update: it working sometimes

Metadata

Metadata

Assignees

No one assigned

    Labels

    timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions