mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
546d6cdd9e
Co-authored-by: Matheus Marchini <mat@mmarchini.me> PR-URL: https://github.com/nodejs/node/pull/27364 Refs: https://github.com/nodejs/build/issues/1774 Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
18 lines
336 B
JavaScript
18 lines
336 B
JavaScript
'use strict';
|
|
|
|
const { spawnSync } = require("child_process");
|
|
const sleepTime = new Number(process.argv[2] || "0.1");
|
|
const repeat = new Number(process.argv[3]) || 5;
|
|
|
|
function functionOne() {
|
|
functionTwo();
|
|
}
|
|
|
|
function functionTwo() {
|
|
spawnSync('sleep', [`${sleepTime}`]);
|
|
}
|
|
|
|
for (let i = 0; i < repeat; i++) {
|
|
functionOne();
|
|
}
|