xref: /third_party/node/test/parallel/test-timers-timeout-with-non-integer.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_ci/**
51cb0ef41Sopenharmony_ci * This test is for https://github.com/nodejs/node/issues/24203
61cb0ef41Sopenharmony_ci */
71cb0ef41Sopenharmony_cilet count = 50;
81cb0ef41Sopenharmony_ciconst time = 1.00000000000001;
91cb0ef41Sopenharmony_ciconst exec = common.mustCall(() => {
101cb0ef41Sopenharmony_ci  if (--count === 0) {
111cb0ef41Sopenharmony_ci    return;
121cb0ef41Sopenharmony_ci  }
131cb0ef41Sopenharmony_ci  setTimeout(exec, time);
141cb0ef41Sopenharmony_ci}, count);
151cb0ef41Sopenharmony_ciexec();
16

Indexes created Thu Nov 07 10:32:03 CST 2024