Workflow Delays, Sleep and Wait
Delays
As a general rule of thumb, do not use delays as part of automations. It is very hard to get delays right. Third-party applications may run slowly, and the delay will not be long enough. Or, in other cases, the delay may cause performance degradation for no apparent reason.
Use delays only as a last resort and after consulting with an experienced Real-Time Designer Developer.
To implement delays, you may use the duration property of the relevant step.
Duration is measured in seconds, and not milliseconds.
If you do implement a delay mechanism using duration, make use of the duration of the previous step. In the transition, set a condition such as
Duration of Step is larger than 1. This ensures a one second delay before moving on to the next step.
If you must use delays, never use the Sleep function to create delays.
Sleep is measured in milliseconds.
The sleep function sleeps the entire CPU, and therefore the entire Real-Time Client. It is never a good idea to halt Real-Time Client entirely, especially when there is a chance that it could get stuck during the sleeping period and never wake up!
Wait
If you do need to create a delay, use the Wait function. To use this function, add a reference to the relevant DLL.
| 1. | In Project > Solutions, select References > Library References and click New Reference. |
| 2. | Select Direct.Input.Helper.dll and click Open. |
| 3. | The Automation Utils type includes the Wait function. |
Wait is measured in milliseconds.