mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Shows the total initialization time
This commit is contained in:
@@ -129,6 +129,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
|
||||
// Sort subsystems by init_order, so they initialize in the correct order.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||
|
||||
var/start_timeofday = world.timeofday
|
||||
// Initialize subsystems.
|
||||
CURRENT_TICKLIMIT = config.tick_limit_mc_init
|
||||
for (var/datum/subsystem/SS in subsystems)
|
||||
@@ -137,9 +138,11 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
|
||||
SS.Initialize(world.timeofday)
|
||||
CHECK_TICK
|
||||
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
|
||||
var/time = (world.timeofday - start_timeofday) / 10
|
||||
|
||||
world << "<span class='boldannounce'>Initializations complete!</span>"
|
||||
log_world("Initializations complete.")
|
||||
var/msg = "Initializations complete within [time] second[time == 1 ? "" : "s"]!"
|
||||
world << "<span class='boldannounce'>msg</span>"
|
||||
log_world(msg)
|
||||
|
||||
// Sort subsystems by display setting for easy access.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_display)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
//used to initialize the subsystem AFTER the map has loaded
|
||||
/datum/subsystem/proc/Initialize(start_timeofday)
|
||||
var/time = (world.timeofday - start_timeofday) / 10
|
||||
var/msg = "Initialized [name] subsystem within [time] seconds!"
|
||||
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
|
||||
world << "<span class='boldannounce'>[msg]</span>"
|
||||
log_world(msg)
|
||||
return time
|
||||
|
||||
Reference in New Issue
Block a user