Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions