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

Last updated

Was this helpful?