/datum/controller/process ![code/datums/controllers/process/_process.dm 2](git.png)
Base definition of a process controller
Vars | |
cpu_defer_count | How many times in the current run has the process deferred work till the next tick? |
---|---|
current_usage | Records the total usage of the current run, each 100 = 1 byond tick |
disabled | TRUE if process is disabled |
hang_alert_time | After this much time, the server will send an admin debug message saying the process may be hung. |
hang_restart_time | After this much time, the server will automatically kill and restart the process. |
hang_warning_time | This is the time after which the server will begin to show "maybe hung" in the context window. |
hung | TRUE if process is blocked up |
idle | TRUE if the process is not running or queued |
killed | TRUE if process was killed |
last_object | Settable last object this loop was processing |
last_slept | Records the time (1/10s timeofday) at which the process last finished sleeping |
last_task | Settable last task this loop was working on |
last_usage | Records the total usage of the last run, each 100 = 1 byond tick |
name | Process name |
previousStatus | Previous status text |
queued | TRUE if process is queued |
run_start | Records the time (1/10s timeofday) at which the process last began running |
running | TRUE if process is running |
schedule_interval | This controls how often the process would run under ideal conditions. If the process scheduler sees that the process has finished, it will wait until this amount of time has elapsed from the start of the previous run to start the process running again. |
schedule_jitter | This is added to the /datum/controller/process/var/schedule_interval when checking it.
By default, this adjusts the interval by either adding or subtracting anywhere in the jitter range.
For example, a jitter of 2 SECONDS for an interval of 10 SECONDS would give times from 8 SECONDS to 12 SECONDS . |
status | Status text to be displayed |
tick_allowance | This controls what percentage a single tick (0 to 100) the process should be allowed to run before sleeping. |
tick_start | Records the world.tick_usage (0 to 100) at which the process last began running drsingh - as of byond 514, world.map_cpu is also included in this via APPROX_TICK_USE |
ticks | Tick count |
times_killed | Records the number of times this process has been killed and restarted |
total_usage | Records the total usage over the life of the process, each 100 = 1 byond tick |
Var Details
cpu_defer_count ![code/datums/controllers/process/_process.dm 69](git.png)
How many times in the current run has the process deferred work till the next tick?
current_usage ![code/datums/controllers/process/_process.dm 86](git.png)
Records the total usage of the current run, each 100 = 1 byond tick
disabled ![code/datums/controllers/process/_process.dm 32](git.png)
TRUE if process is disabled
hang_alert_time ![code/datums/controllers/process/_process.dm 63](git.png)
After this much time, the server will send an admin debug message saying the process may be hung.
hang_restart_time ![code/datums/controllers/process/_process.dm 66](git.png)
After this much time, the server will automatically kill and restart the process.
hang_warning_time ![code/datums/controllers/process/_process.dm 60](git.png)
This is the time after which the server will begin to show "maybe hung" in the context window.
hung ![code/datums/controllers/process/_process.dm 20](git.png)
TRUE if process is blocked up
idle ![code/datums/controllers/process/_process.dm 11](git.png)
TRUE if the process is not running or queued
killed ![code/datums/controllers/process/_process.dm 23](git.png)
TRUE if process was killed
last_object ![code/datums/controllers/process/_process.dm 106](git.png)
Settable last object this loop was processing
last_slept ![code/datums/controllers/process/_process.dm 76](git.png)
Records the time (1/10s timeofday) at which the process last finished sleeping
last_task ![code/datums/controllers/process/_process.dm 101](git.png)
Settable last task this loop was working on
last_usage ![code/datums/controllers/process/_process.dm 89](git.png)
Records the total usage of the last run, each 100 = 1 byond tick
name ![code/datums/controllers/process/_process.dm 39](git.png)
Process name
previousStatus ![code/datums/controllers/process/_process.dm 29](git.png)
Previous status text
queued ![code/datums/controllers/process/_process.dm 14](git.png)
TRUE if process is queued
run_start ![code/datums/controllers/process/_process.dm 79](git.png)
Records the time (1/10s timeofday) at which the process last began running
running ![code/datums/controllers/process/_process.dm 17](git.png)
TRUE if process is running
schedule_interval ![code/datums/controllers/process/_process.dm 45](git.png)
This controls how often the process would run under ideal conditions. If the process scheduler sees that the process has finished, it will wait until this amount of time has elapsed from the start of the previous run to start the process running again.
schedule_jitter ![code/datums/controllers/process/_process.dm 54](git.png)
This is added to the /datum/controller/process/var/schedule_interval when checking it.
By default, this adjusts the interval by either adding or subtracting anywhere in the jitter range.
For example, a jitter of 2 SECONDS
for an interval of 10 SECONDS
would give times from 8 SECONDS
to 12 SECONDS
.
For more complex behavior, override [/datum/controller/processScheduler/proc/setQueuedProcessState]. Necessary for runtime jitter range change.
status ![code/datums/controllers/process/_process.dm 26](git.png)
Status text to be displayed
tick_allowance ![code/datums/controllers/process/_process.dm 57](git.png)
This controls what percentage a single tick (0 to 100) the process should be allowed to run before sleeping.
tick_start ![code/datums/controllers/process/_process.dm 83](git.png)
Records the world.tick_usage (0 to 100) at which the process last began running drsingh - as of byond 514, world.map_cpu is also included in this via APPROX_TICK_USE
ticks ![code/datums/controllers/process/_process.dm 98](git.png)
Tick count
times_killed ![code/datums/controllers/process/_process.dm 95](git.png)
Records the number of times this process has been killed and restarted
total_usage ![code/datums/controllers/process/_process.dm 92](git.png)
Records the total usage over the life of the process, each 100 = 1 byond tick