SIMPOL Documentation

Chapter 93. timer

This is a mulit-threaded timer implementation which can create a timer to call an event-handling function at a specific time or at a regular interval.

timer

Description

Type Tags

timer

Object Value

Objects of type timer have no value, and it is an error to try to get or set this value.

timer.new()

Description

Prototype

timer.new ( timer me, datetime alarm, integer repeat, integer interval )

Parameters

ParameterDefault valueType nameDescription
meNonetimer
alarmNonedatetime
repeatNoneinteger
intervalNoneinteger

Properties

PropertyTypeDescription
_type(*)
__type(*)
_privatetimerprivate
getinfofunction
ontimerevent
setinfofunction
startfunction
startedboolean
stopfunction
typetype

Methods

getinfo()

Description

Prototype

timervar.getinfo ( timer me )

Parameters
ParameterDefault valueType nameDescription
meNonetimer

setinfo()

Description

Prototype

timervar.setinfo ( timer me, datetime alarm, integer repeat, integer interval, integer microinterval )

Parameters
ParameterDefault valueType nameDescription
meNonetimer
alarmNonedatetime
repeatNoneinteger
intervalNoneinteger
microinterval10000integer

start()

Description

Prototype

timervar.start ( timer me )

Parameters
ParameterDefault valueType nameDescription
meNonetimer

stop()

Description

Prototype

timervar.stop ( timer me )

Parameters
ParameterDefault valueType nameDescription
meNonetimer