Contents

Method

Sleep

ModuleAgent
LibraryCore
Action

Pause for the specified number of seconds.

Parameters

Seconds (int): The number of seconds for which to to pause; must be >0.

Force (boolean; optional, default false): Usually, if the agent is shutting down, we do not start the sleep. However, if we want to test something that happens during shutdown, it is useful to force a sleep in that situation.

Exclusive (boolean; optional, default false): Usually the sleep will affect only the instruction's worker thread, and other instructions running in parallel on other threads are not blocked. If this flag is set then this worker will wait for any already-set exclusivity to finish, then set the exclusivity block while it runs so that other exclusivity users will be blocked until the sleep has completed.

Return valuesSleepTime (int): The same as Seconds.
Example
 Agent.Sleep(Seconds:120, Force:true, Exclusive:true);
Platforms
  • Windows
  • Linux
  • MacOS
  • Solaris Intel
  • Solaris Sparc
  • Android
Notes

Only useful for testing.