sleep()


Suspend process execution for a number of seconds.

Syntax

sleep(seconds)

Parameter

Parameter

Definition

seconds

integer specifying the number of seconds the process should be suspended

*Valid Values*

  • seconds > 0 is the number of seconds the process will sleep
  • seconds ≤ 0 the timer expires immediately

Description

The sleep() function suspends a PSL process for the specified number of seconds. While suspended, the PSL process consumes no CPU resources and is not interpreted until awakened by the expiration of the seconds timer. 

Note

 The sleep() function only suspends the process that calls it. All other PSL processes continue normal execution.


Example

The following is an example o f the sleep() function:

print("Hello world!\n");
sleep(10);
print("Good-bye world!\n");

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*