Suspend execution for a specified number of seconds, or with the special ON or OFF operands can turn the execution of the SLEEP command on or off. Note that the -s option to jkeyauto can also be used to turn off execution of the SLEEP statement by default - in this case the SLEEP ON will subsequently over-ride this.
Syntax
SLEEP {expression} | ON | OFF
ON | When "SLEEP ON" is executed all SLEEP statements will be executed as normal. |
OFF | When "SLEEP OFF" is executed, all SLEEP statements will be ignored. |
expression The time to sleep expressed as a number of seconds.
If the sleep time "expression" is not specified, it defaults to 1 second.
You can set a non-integer value to sleep for fractions of a second. The actual sleep time will depend upon the granularity of the system clock and the load on the system.
Typically resolutions to the nearest 1/100th of a second are usually possible.
value=0.6
time1=$UBOOT
sleep value*2
print "Sleep: Request = ":value*2:" secs, actual = ":$UBOOT-time1
JKEYAUTO