Files
Kmake/test/fixtures/linux-perf.js

18 lines
336 B
JavaScript
Raw Permalink Normal View History

2026-05-26 23:36:42 -07:00
'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();
}