9 lines
9.1 KiB
HTML
9 lines
9.1 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/timedevent - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="datum/timedevent.html#var">Var Details</a> - <a href="datum/timedevent.html#proc">Proc Details</a></header><main><h1>Timed Event <aside>/<a href="datum.html">datum</a>/<a href="datum/timedevent.html">timedevent</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L331"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 331"></a></h1><p>This is the actual timer, it contains the callback and necessary data to maintain
|
||
the timer.</p>
|
||
<p>See the documentation for the timer subsystem for an explanation of the buckets referenced
|
||
below in next and prev</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/timedevent.html#var/callBack">callBack</a></th><td>The callback to invoke after the timer completes</td></tr><tr><th><a href="datum/timedevent.html#var/flags">flags</a></th><td>Flags associated with the timer, see _DEFINES/subsystems.dm</td></tr><tr><th><a href="datum/timedevent.html#var/hash">hash</a></th><td>Unique hash generated when TIMER_UNIQUE flag is present</td></tr><tr><th><a href="datum/timedevent.html#var/id">id</a></th><td>ID used for timers when the TIMER_STOPPABLE flag is present</td></tr><tr><th><a href="datum/timedevent.html#var/name">name</a></th><td>An informative name generated for the timer as its representation in strings, useful for debugging</td></tr><tr><th><a href="datum/timedevent.html#var/next">next</a></th><td>Next timed event in the bucket</td></tr><tr><th><a href="datum/timedevent.html#var/prev">prev</a></th><td>Previous timed event in the bucket</td></tr><tr><th><a href="datum/timedevent.html#var/source">source</a></th><td>The source of the timedevent, whatever called addtimer</td></tr><tr><th><a href="datum/timedevent.html#var/spent">spent</a></th><td>Time at which the timer was invoked or destroyed</td></tr><tr><th><a href="datum/timedevent.html#var/timeToRun">timeToRun</a></th><td>The time at which the callback should be invoked at</td></tr><tr><th><a href="datum/timedevent.html#var/wait">wait</a></th><td>The length of the timer</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/timedevent.html#proc/bucketEject">bucketEject</a></th><td>Removes this timed event from any relevant buckets, or the secondary queue</td></tr><tr><th><a href="datum/timedevent.html#proc/bucketJoin">bucketJoin</a></th><td>Attempts to add this timed event to a bucket, will enter the secondary queue
|
||
if there are no appropriate buckets at this time.</td></tr><tr><th><a href="datum/timedevent.html#proc/getcallingtype">getcallingtype</a></th><td>Returns a string of the type of the callback for this timer</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/callBack"><aside class="declaration">var </aside>callBack <aside>– /<a href="datum.html">datum</a>/<a href="datum/callback.html">callback</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L335"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 335"></a></h3><p>The callback to invoke after the timer completes</p><h3 id="var/flags"><aside class="declaration">var </aside>flags <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L345"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 345"></a></h3><p>Flags associated with the timer, see _DEFINES/subsystems.dm</p><h3 id="var/hash"><aside class="declaration">var </aside>hash <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L341"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 341"></a></h3><p>Unique hash generated when TIMER_UNIQUE flag is present</p><h3 id="var/id"><aside class="declaration">var </aside>id <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L333"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 333"></a></h3><p>ID used for timers when the TIMER_STOPPABLE flag is present</p><h3 id="var/name"><aside class="declaration">var </aside>name <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L349"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 349"></a></h3><p>An informative name generated for the timer as its representation in strings, useful for debugging</p><h3 id="var/next"><aside class="declaration">var </aside>next <aside>– /<a href="datum.html">datum</a>/<a href="datum/timedevent.html">timedevent</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L351"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 351"></a></h3><p>Next timed event in the bucket</p><h3 id="var/prev"><aside class="declaration">var </aside>prev <aside>– /<a href="datum.html">datum</a>/<a href="datum/timedevent.html">timedevent</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L355"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 355"></a></h3><p>Previous timed event in the bucket</p><h3 id="var/source"><aside class="declaration">var </aside>source <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L343"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 343"></a></h3><p>The source of the timedevent, whatever called addtimer</p><h3 id="var/spent"><aside class="declaration">var </aside>spent <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L347"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 347"></a></h3><p>Time at which the timer was invoked or destroyed</p><h3 id="var/timeToRun"><aside class="declaration">var </aside>timeToRun <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L337"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 337"></a></h3><p>The time at which the callback should be invoked at</p><h3 id="var/wait"><aside class="declaration">var </aside>wait <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L339"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 339"></a></h3><p>The length of the timer</p><h2 id="proc">Proc Details</h2><h3 id="proc/bucketEject"><aside class="declaration">proc </aside>bucketEject<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L423"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 423"></a></aside></h3><p>Removes this timed event from any relevant buckets, or the secondary queue</p><h3 id="proc/bucketJoin"><aside class="declaration">proc </aside>bucketJoin<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L469"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 469"></a></aside></h3><p>Attempts to add this timed event to a bucket, will enter the secondary queue
|
||
if there are no appropriate buckets at this time.</p>
|
||
<p>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.</p><h3 id="proc/getcallingtype"><aside class="declaration">proc </aside>getcallingtype<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L512"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 512"></a></aside></h3><p>Returns a string of the type of the callback for this timer</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html> |