<< now Time functions tic >>

sleep


Suspend code execution.


Syntax


sleep(sec)

Input argument


n

a double: duration of the sleep in seconds (decimal number).

Description


sleep stops Nelson processing any instruction for a speficied number of seconds.

CTRL-C interruption stops sleep.

Example


tic();sleep(1);toc()
tic();sleep(0.1);toc()
tic();sleep(0.01);toc()

See also


tic, toc.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< now Time functions tic >>