mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
9 lines
10 KiB
HTML
9 lines
10 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/timedevent - Space Station 13</title></head><body><header><a href="index.html">Space 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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L369"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 369"></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/bucket_joined">bucket_joined</a></th><td>Boolean indicating if timer joined into bucket</td></tr><tr><th><a href="datum/timedevent.html#var/bucket_pos">bucket_pos</a></th><td>Initial bucket position</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/getTimerInfo">getTimerInfo</a></th><td>Returns debug information about timer</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/bucket_joined"><aside class="declaration">var </aside>bucket_joined <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L393"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 393"></a></h3><p>Boolean indicating if timer joined into bucket</p><h3 id="var/bucket_pos"><aside class="declaration">var </aside>bucket_pos <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L395"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 395"></a></h3><p>Initial bucket position</p><h3 id="var/callBack"><aside class="declaration">var </aside>callBack <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L373"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 373"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L383"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 383"></a></h3><p>Flags associated with the timer, see _DEFINES/subsystems.dm</p><h3 id="var/hash"><aside class="declaration">var </aside>hash <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L379"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 379"></a></h3><p>Unique hash generated when TIMER_UNIQUE flag is present</p><h3 id="var/id"><aside class="declaration">var </aside>id <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L371"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 371"></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 <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L387"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 387"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L389"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 389"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L391"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 391"></a></h3><p>Previous timed event in the bucket</p><h3 id="var/source"><aside class="declaration">var </aside>source <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L381"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 381"></a></h3><p>The source of the timedevent, whatever called addtimer</p><h3 id="var/spent"><aside class="declaration">var </aside>spent <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L385"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 385"></a></h3><p>Time at which the timer was invoked or destroyed</p><h3 id="var/timeToRun"><aside class="declaration">var </aside>timeToRun <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L375"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 375"></a></h3><p>The time at which the callback should be invoked at</p><h3 id="var/wait"><aside class="declaration">var </aside>wait <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L377"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 377"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L465"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 465"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L508"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 508"></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/getTimerInfo"><aside class="declaration">proc </aside>getTimerInfo<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L554"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 554"></a></aside></h3><p>Returns debug information about timer</p><h3 id="proc/getcallingtype"><aside class="declaration">proc </aside>getcallingtype<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L569"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 569"></a></aside></h3><p>Returns a string of the type of the callback for this timer</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |