1. Home
  2. %SLEEP directive

%SLEEP directive

Pauses execution of the server for a time specified in seconds.

No options

Parameter

scalar Specifies the time in seconds to pause

Description

%SLEEP has a single, unnamed, parameter, which is a scalar giving the number of seconds for the server to halt processing. The current set of commands continues after this period of time. For example,

%SLEEP 2

stops the server processing for two seconds. This can be used to allow other processes to complete before the server resumes execution. For example, the saving of graphs to PNG files using the OPEN and DEVICE commands runs asynchronously to the server process that generates them. You may therefore need to wait for these to be created if they are to be used in another part of the program.

Options: none.
Parameter: unnamed.
Commands for: Program control.

Updated on February 7, 2023

Was this article helpful?