Shows the total initialization time

This commit is contained in:
Cyberboss
2017-02-15 11:19:20 -05:00
parent 22976bf48f
commit 0eef753fd4
2 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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