Files
GS13NG/datum/controller/subsystem/timer.html
T
2025-02-05 06:19:18 +00:00

1 line
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/controller/subsystem/timer - /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/controller/subsystem/timer.html#var">Var Details</a> - <a href="datum/controller/subsystem/timer.html#proc">Proc Details</a></header><main><h1>timer <aside>/<a href="datum.html">datum</a>/<a href="datum/controller/subsystem.html">controller/subsystem</a>/<a href="datum/controller/subsystem/timer.html">timer</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L19"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 19"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/bucket_auto_reset">bucket_auto_reset</a></th><td>Boolean operator controlling if the timer SS will automatically reset buckets if it fails to invoke callbacks for an extended period of time</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/bucket_count">bucket_count</a></th><td>How many timers are in the buckets</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/bucket_list">bucket_list</a></th><td>List of buckets, each bucket holds every timer that has to run that byond tick</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/bucket_resolution">bucket_resolution</a></th><td>world.tick_lag the bucket was designed for</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/clienttime_timers">clienttime_timers</a></th><td>Special timers that run in real-time, not BYOND time; these are more expensive to run and maintain</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/hashes">hashes</a></th><td>A hashlist dictionary used for storing unique timers</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/head_offset">head_offset</a></th><td>world.time of the first entry in the bucket list, effectively the 'start time' of the current buckets</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/last_invoke_tick">last_invoke_tick</a></th><td>Contains the last time that a timer's callback was invoked, or the last tick the SS fired if no timers are being processed</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/last_invoke_warning">last_invoke_warning</a></th><td>Contains the last time that a warning was issued for not invoking callbacks</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/practical_offset">practical_offset</a></th><td>Index of the wrap around pivot for buckets. buckets before this are later running buckets wrapped around from the end of the bucket list.</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/second_queue">second_queue</a></th><td>Queue used for storing timers that do not fit into the current buckets</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#var/timer_id_dict">timer_id_dict</a></th><td>List of all active timers associated to their timer ID (for easy lookup)</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/controller/subsystem/timer.html#proc/get_timer_debug_string">get_timer_debug_string</a></th><td>Generates a string with details about the timed event for debugging purposes</td></tr><tr><th><a href="datum/controller/subsystem/timer.html#proc/reset_buckets">reset_buckets</a></th><td>Destroys the existing buckets and creates new buckets from the existing timed events</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/bucket_auto_reset"><aside class="declaration">var </aside>bucket_auto_reset <aside> /static</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L49"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 49"></a></h3><p>Boolean operator controlling if the timer SS will automatically reset buckets if it fails to invoke callbacks for an extended period of time</p><h3 id="var/bucket_count"><aside class="declaration">var </aside>bucket_count <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L37"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 37"></a></h3><p>How many timers are in the buckets</p><h3 id="var/bucket_list"><aside class="declaration">var </aside>bucket_list <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L39"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 39"></a></h3><p>List of buckets, each bucket holds every timer that has to run that byond tick</p><h3 id="var/bucket_resolution"><aside class="declaration">var </aside>bucket_resolution <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L35"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 35"></a></h3><p>world.tick_lag the bucket was designed for</p><h3 id="var/clienttime_timers"><aside class="declaration">var </aside>clienttime_timers <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L43"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 43"></a></h3><p>Special timers that run in real-time, not BYOND time; these are more expensive to run and maintain</p><h3 id="var/hashes"><aside class="declaration">var </aside>hashes <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L29"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 29"></a></h3><p>A hashlist dictionary used for storing unique timers</p><h3 id="var/head_offset"><aside class="declaration">var </aside>head_offset <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L31"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 31"></a></h3><p>world.time of the first entry in the bucket list, effectively the 'start time' of the current buckets</p><h3 id="var/last_invoke_tick"><aside class="declaration">var </aside>last_invoke_tick <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L45"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 45"></a></h3><p>Contains the last time that a timer's callback was invoked, or the last tick the SS fired if no timers are being processed</p><h3 id="var/last_invoke_warning"><aside class="declaration">var </aside>last_invoke_warning <aside> /static</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L47"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 47"></a></h3><p>Contains the last time that a warning was issued for not invoking callbacks</p><h3 id="var/practical_offset"><aside class="declaration">var </aside>practical_offset <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L33"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 33"></a></h3><p>Index of the wrap around pivot for buckets. buckets before this are later running buckets wrapped around from the end of the bucket list.</p><h3 id="var/second_queue"><aside class="declaration">var </aside>second_queue <aside> /list/datum/timedevent</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L27"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 27"></a></h3><p>Queue used for storing timers that do not fit into the current buckets</p><h3 id="var/timer_id_dict"><aside class="declaration">var </aside>timer_id_dict <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L41"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 41"></a></h3><p>List of all active timers associated to their timer ID (for easy lookup)</p><h2 id="proc">Proc Details</h2><h3 id="proc/get_timer_debug_string"><aside class="declaration">proc </aside>get_timer_debug_string<aside>(/<a href="datum.html">datum</a>/<a href="datum/timedevent.html">timedevent</a>/TE) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L214"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 214"></a></aside></h3><p>Generates a string with details about the timed event for debugging purposes</p><h3 id="proc/reset_buckets"><aside class="declaration">proc </aside>reset_buckets<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/timer.dm#L227"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/timer.dm 227"></a></aside></h3><p>Destroys the existing buckets and creates new buckets from the existing timed events</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>