rudl_timer

Back to index

# Index

Timer
Class Methods
`Timer.delay( milliseconds )`
`Timer.ticks`
EventTimer
Class Methods
`EventTimer.new( interval, id )`
Instance Methods
`EventTimer#stop`
Events
TimerEvent
`TimerEvent#id`

# Timer

## Class Methods

`Timer.delay( milliseconds )`

Will do nothing for milliseconds milliseconds. It is not guaranteed to be exact and has different resolution on different platforms. Expect a resolution of 10 to 20 milliseconds at worst.

`Timer.ticks`

Returns the time in milliseconds since RUDL was required.

# EventTimer

A class that controls delivering `TimerEvent`s on a regular basis.

## Class Methods

`EventTimer.new( interval, id )`

Will create a EventTimer object that controls sending `TimerEvent`s every interval milliseconds, having their id-field set to id - which is a number.

## Instance Methods

`EventTimer#stop`

Will stop this EventTimer from posting more `TimerEvent`s.

# Events

## TimerEvent

This event is posted regularly by an EventTimer object.

`TimerEvent#id`

This is the EventTimer's id.

Back to index