GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The Sleep function releases the script’s process thread and waits a specified amount of time before requeuing the script.
Syntax/Parameters
Syntax
int = Sleep ( int wait );
Parameters
wait
An int containing the minimum amount of time for the script to sleep in milliseconds. Setting the value to zero effectively yields the process.
Return Value
Returns an int as ERROR_NONE.
Remarks
This function causes a thread to relinquish the remainder of its time slice and become unrunnable for an interval based on the value of wait. The system clock “ticks” at a constant rate. If wait is less than the resolution of the system clock, the script may sleep for less than the specified length of time. If wait is greater than one tick but less than two, the script may sleep from anywhere between one and two ticks, and so on. If wait is zero milliseconds, the script will relinquish the remainder of its time slice but remain ready.
After the sleep interval has passed, the script is ready to run. Note that a ready thread is not guaranteed to run immediately. Consequently, the script may not run until some time after the sleep interval elapses. For more information, see Scheduling Priorities.
Note that while this function is superior to “looping” while waiting for an event, using the Sleep function within a loop will lockup the application if running in the primary thread. Programmers are cautioned about setting large time amounts with the wait parameter because the Sleep function cannot be interrupted and terminating the application may be required to stop it.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.