Controlling Timing

NOTE: The examples on this page refer to timing in tests automated using auto-scripts. The functions are also useful in other scripts.

You can control the timing of an experiment with the WakeUp(), Delay(), DelayFrom(), and Time() functions.


WakeUp() controls the start time of a process.

For example:

if (WakeUp("15:30:00",NIL) eq FALSE)


if (LaunchWait("Auto Polarization Resistance.exp","myparms.set","MyRpSetup","rp.dta",1,5) eq FALSE)


In this example, the function WakeUp() sleeps until ‘today’ at 3:30 pm at which time the software launches AUTO POLARIZATION RESISTANCE.EXP. To change the time, edit the 15:30:00 string to whatever time you prefer. The times are expressed using a 24-hour clock; the last pair of digits are the seconds. The seconds setting is required. The NIL parameter is just a shorthand way of saying use today for the date. If you need to start your experiment at a later date replace the NIL parameter with the appropriate date string like 06/25/17.

If the time has already past when the script runs, the WakeUp() returns immediately. For example, if you use Wakeup("15:30:00", NIL) and it is 4:00 PM when the master script is started, the call to WakeUp() does not pause.

Because WakeUp() uses your host computer’s clock time and date, it is important to check them periodically for accuracy. WakeUp() also pays attention to your Windows® International Date & Time Format selections. Please refer to your Windows help for international information.


If you prefer that the script pauses for a few minutes, use the Delay() function. For example:

if (Delay(600) eq FALSE)


LaunchWait("Auto Potentiostatic EIS.exp",...)

In this example the master script delays for 600 seconds and then continues. If the you hit the Skip button and then select "Terminate the script", Delay() returns FALSE and the script "returns". If you hit the Skip key and then select "Skip to the next experiment", Delay() returns TRUE and the Auto Potentiostatic EIS.exp starts immediately.

DelayFrom() and Time()

You can control a delay with respect to a fixed point in time with the DelayFrom() and Time() function. For example:

StartTime = Time()

; Do Something Arbitrary In Time Here

; ...

if (DelayFrom(600,StartTime) eq FALSE)


In this example the StartTime is memorized. DelayFrom() delays until 600 seconds after StartTime.