mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
1 line
11 KiB
HTML
1 line
11 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/controller/subsystem/timer - 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/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.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/timer.html">timer</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L19"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.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_reset_count">bucket_reset_count</a></th><td>How many times bucket was reset</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/next_clienttime_timer_index">next_clienttime_timer_index</a></th><td>Keeps track of the next index to work on for client timers</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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L53"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 53"></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 <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L39"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 39"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L41"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 41"></a></h3><p>List of buckets, each bucket holds every timer that has to run that byond tick</p><h3 id="var/bucket_reset_count"><aside class="declaration">var </aside>bucket_reset_count <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L55"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 55"></a></h3><p>How many times bucket was reset</p><h3 id="var/bucket_resolution"><aside class="declaration">var </aside>bucket_resolution <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L37"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 37"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L45"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 45"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L31"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 31"></a></h3><p>A hashlist dictionary used for storing unique timers</p><h3 id="var/head_offset"><aside class="declaration">var </aside>head_offset <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L33"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 33"></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 <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L47"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 47"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L51"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 51"></a></h3><p>Contains the last time that a warning was issued for not invoking callbacks</p><h3 id="var/next_clienttime_timer_index"><aside class="declaration">var </aside>next_clienttime_timer_index <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L49"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 49"></a></h3><p>Keeps track of the next index to work on for client timers</p><h3 id="var/practical_offset"><aside class="declaration">var </aside>practical_offset <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L35"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 35"></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/<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#L29"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 29"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L43"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 43"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L230"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 230"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/SStimer.dm#L243"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 243"></a></aside></h3><p>Destroys the existing buckets and creates new buckets from the existing timed events</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> |