Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#!/usr/bin/env jsish
"use strict";
/* Rate counter, timer access, in Jsish */
/* System time in milliseconds */
var runs = 0, newMs;
function countJobsIsTheJob() { runs += 1; }
var milliSeconds = strptime();
while ((newMs = strptime()) < (milliSeconds + 1000)) { countJobsIsTheJob(); }
puts(runs, 'runs in', newMs - milliSeconds, 'ms');
/* Builtin times test(callback, runs), result in microseconds */
function sleeper() { sleep(10); }
var timer;
for (var i = 1; i < 4; i++) {
timer = times(sleeper, 100);
puts(timer, 'μs to sleep 10 ms, 100 times');
}