timer

The timer tag fires events at regular intervals. Timers can operate on their own or linked to other timers.  ogScript commands exist to start/stop/reset timers (see ogScript documentation for more details).

Tasks are attached to listener tags to process data received.

Attributes

Attribute

Values

Restrictions

Description

id

String

Optional

The ID used to reference this timer.  Required for ogScript, child timers, or external <timertask/> tags to interact with the timer.

source

String

Optional.

Must be the ID of another timer.

If used, the timer being defined will be a child of the timer with the given ID.

rate

Long

Not applicable if “source” is set.

The rate (in milliseconds) at which the timer fires.

delay

Long

Not applicable if “source” is set.

The delay (in milliseconds) before the timer initially fires.

pattern

String

 

The display pattern for the timer’s current time:

https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

start

Long

or time in format of “pattern”

 

The start value of the timer.  If start > stop, timer counts down.

If start is undefined, the timer is ‘clock mode’

stop

Long

or time in format of “pattern”

 

The start value of the timer.  If start > stop, timer counts down.

If start is undefined, the timer is ‘clock mode’

autostart

true

*false

Default value is true if ‘clock mode’ is used.

Whether or not the timer automatically starts.  If it is not automatically started, an ogScript command must be issued to the timer to start it.