#include "gbos.h" /* sleep N: wait N seconds (the kernel counts 1/64 s ticks, so N is capped at * what fits: 3 seconds per gsleep call, looped). Mostly useful in scripts and * to pace a background job. */ void main(void) { char *argv[4]; unsigned char argc = argv_parse(argv, 4); unsigned char n, i; if (argc < 1) { puts("usage: sleep SECONDS"); nl(); sexit(2); } n = atou(argv[0]); for (i = 0; i < n; i++) gsleep(64); /* 64 ticks = one second */ }