mk90.commands
Command sleep
Suspend the foreground command while other tasks continue.
Synopsis
sleep secondsOrdinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.
Parameters
| Parameter | Meaning |
|---|---|
seconds | Decimal integer from 0 to 1023 inclusive. |
Description
Converts whole seconds to 32 Hz RTC ticks and calls the cooperative sleep service. A value of zero yields without a timed delay.
The shell waits for this foreground child. Background workers still run, subject to cooperation. Waking occurs after the deadline when a runnable context can be selected.
Examples
run count 5
sleep 2
psLimits and side effects
- No fractional durations. The sleep command does not poll for SU+C during its timed wait; it is not a general cancellable timer.
Status and diagnostics
Success is status 0. Relevant status codes: 1, 8. See the diagnostic reference.
See also
time · wait · run · Shell syntax