This command executes the TimerProc macro every cycleLength second.


timer  cycleLength

Before issuing this command, you must define the action TimerProc should perform.

The indicates whether or not the timer is running. 1 = timer is running, 0 = timer is not running.

Note: The name "Time" is used for the Origin C function, therefore the command name "Timer" should not be shortened to "Time". (The @OC system variable may be set to 0 so that the script interpreter ignores Origin C function names. But, it should be careful because it affects other Origin C functions.)


no option; Execute TimerProc every cycleLength second

Syntax: timer cycleLength

Execute the TimerProc macro every cycleLength second.

-k; Stop executing the TimerProc macro

Syntax: timer -k

Stop executing the TimerProc macro. This removes the current timer.


Example 1

The following script prints "Hello" to the Script window every twenty seconds.

def TimerProc {type "Hello"};
timer 20;

See Also:

Second (command), TimerError, TimerProc, Watch