byond - Modules - TypesVar Details - Proc Details

Timed Event

This is the actual timer, it contains the callback and necessary data to maintain the timer.

See the documentation for the timer subsystem for an explanation of the buckets referenced below in next and prev

Vars

bucket_joinedBoolean indicating if timer joined into bucket
bucket_posInitial bucket position
callBackThe callback to invoke after the timer completes
flagsFlags associated with the timer, see _DEFINES/subsystems.dm
hashUnique hash generated when TIMER_UNIQUE flag is present
idID used for timers when the TIMER_STOPPABLE flag is present
nameAn informative name generated for the timer as its representation in strings, useful for debugging
nextNext timed event in the bucket
prevPrevious timed event in the bucket
sourceThe source of the timedevent, whatever called addtimer
spentTime at which the timer was invoked or destroyed
timeToRunThe time at which the callback should be invoked at
timer_subsystemThe timer subsystem this event is associated with
waitThe length of the timer

Procs

bucketEjectRemoves this timed event from any relevant buckets, or the secondary queue
bucketJoinAttempts to add this timed event to a bucket, will enter the secondary queue if there are no appropriate buckets at this time.
getcallingtypeReturns a string of the type of the callback for this timer

Var Details

bucket_joined

Boolean indicating if timer joined into bucket

bucket_pos

Initial bucket position

callBack

The callback to invoke after the timer completes

flags

Flags associated with the timer, see _DEFINES/subsystems.dm

hash

Unique hash generated when TIMER_UNIQUE flag is present

id

ID used for timers when the TIMER_STOPPABLE flag is present

name

An informative name generated for the timer as its representation in strings, useful for debugging

next

Next timed event in the bucket

prev

Previous timed event in the bucket

source

The source of the timedevent, whatever called addtimer

spent

Time at which the timer was invoked or destroyed

timeToRun

The time at which the callback should be invoked at

timer_subsystem

The timer subsystem this event is associated with

wait

The length of the timer

Proc Details

bucketEject

Removes this timed event from any relevant buckets, or the secondary queue

bucketJoin

Attempts to add this timed event to a bucket, will enter the secondary queue if there are no appropriate buckets at this time.

Secondary queueing of timed events will occur when the timespan covered by the existing buckets is exceeded by the time at which this timed event is scheduled to be invoked. If the timed event is tracking client time, it will be added to a special bucket.

getcallingtype

Returns a string of the type of the callback for this timer