Home  Contents

os.sleep

OS Core4 Lua Commands

SYNOPSIS

  1. os.sleep(seconds)
  2. os.msleep(milliseconds)
  3. os.usleep(microseconds)

DESCRIPTION

Suspends the current program execution for the specified amount of time. The process will enter sleep state and will not consume any CPU time while it sleeps.

NOTES

The process stops dead while sleeping. If you use any of the event processing commands, better use event:pause(), which keeps the message loop running during the delay.