mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 18:42:44 +00:00
Remove temporary debug logging from SStimer
This commit is contained in:
@@ -78,7 +78,6 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
|||||||
// Subsystem fire priority, from lowest to highest priority
|
// Subsystem fire priority, from lowest to highest priority
|
||||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||||
#define FIRE_PRIORITY_SHUTTLES 5
|
#define FIRE_PRIORITY_SHUTTLES 5
|
||||||
#define FIRE_PRIORITY_TIMERS 7 //VOREStation Emergency Edit
|
|
||||||
#define FIRE_PRIORITY_ORBIT 8
|
#define FIRE_PRIORITY_ORBIT 8
|
||||||
#define FIRE_PRIORITY_VOTE 9
|
#define FIRE_PRIORITY_VOTE 9
|
||||||
#define FIRE_PRIORITY_AI 10
|
#define FIRE_PRIORITY_AI 10
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ SUBSYSTEM_DEF(timer)
|
|||||||
var/last_invoke_tick = 0
|
var/last_invoke_tick = 0
|
||||||
var/static/last_invoke_warning = 0
|
var/static/last_invoke_warning = 0
|
||||||
var/static/bucket_auto_reset = TRUE
|
var/static/bucket_auto_reset = TRUE
|
||||||
var/static/datum/timedevent/timer // VOREStation Edit - For debugging this goes here.
|
|
||||||
var/super_debug = FALSE // VOREStation Edit - Temporary Debugging
|
|
||||||
|
|
||||||
/datum/controller/subsystem/timer/PreInit()
|
/datum/controller/subsystem/timer/PreInit()
|
||||||
bucket_list.len = BUCKET_LEN
|
bucket_list.len = BUCKET_LEN
|
||||||
@@ -104,13 +102,11 @@ SUBSYSTEM_DEF(timer)
|
|||||||
if (next_clienttime_timer_index)
|
if (next_clienttime_timer_index)
|
||||||
clienttime_timers.Cut(1, next_clienttime_timer_index+1)
|
clienttime_timers.Cut(1, next_clienttime_timer_index+1)
|
||||||
|
|
||||||
var/pre_state = src.state
|
|
||||||
if (MC_TICK_CHECK)
|
if (MC_TICK_CHECK)
|
||||||
log_world("Timer bailing before execution at world.time=[world.time] with LIT=[last_invoke_tick], TICK_USAGE=[TICK_USAGE], current_ticklimit=[Master.current_ticklimit], state=[pre_state] -> [src.state], queued_priority=[queued_priority] tick_overrun=[tick_overrun]") // VOREStation Edit - Debugging
|
|
||||||
return
|
return
|
||||||
|
|
||||||
var/static/list/spent = list()
|
var/static/list/spent = list()
|
||||||
// var/static/datum/timedevent/timer VOREStation Edit - for debugging purpose putting this as datum scope
|
var/static/datum/timedevent/timer
|
||||||
if (practical_offset > BUCKET_LEN)
|
if (practical_offset > BUCKET_LEN)
|
||||||
head_offset += TICKS2DS(BUCKET_LEN)
|
head_offset += TICKS2DS(BUCKET_LEN)
|
||||||
practical_offset = 1
|
practical_offset = 1
|
||||||
@@ -143,15 +139,8 @@ SUBSYSTEM_DEF(timer)
|
|||||||
last_invoke_tick = world.time
|
last_invoke_tick = world.time
|
||||||
|
|
||||||
if (MC_TICK_CHECK)
|
if (MC_TICK_CHECK)
|
||||||
if (super_debug) log_world("Bailing from execution with practical_offset=[practical_offset] and timer=[timer]") // VOREStation Edit - Super Debug
|
|
||||||
return
|
return
|
||||||
|
|
||||||
// VOREStation Edit Start - Debugging
|
|
||||||
if (timer.next == timer && timer.next != head)
|
|
||||||
log_world("Self-looping out of bucket timer failure condition X occurred")
|
|
||||||
CRASH("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
|
|
||||||
// VOREStation Edit End - Debugging
|
|
||||||
|
|
||||||
timer = timer.next
|
timer = timer.next
|
||||||
if (timer == head)
|
if (timer == head)
|
||||||
break
|
break
|
||||||
@@ -246,11 +235,6 @@ SUBSYSTEM_DEF(timer)
|
|||||||
|
|
||||||
/datum/controller/subsystem/timer/proc/reset_buckets()
|
/datum/controller/subsystem/timer/proc/reset_buckets()
|
||||||
var/list/bucket_list = src.bucket_list
|
var/list/bucket_list = src.bucket_list
|
||||||
// VOREStation Edit Start - Debugging
|
|
||||||
log_world("Beginning Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \
|
|
||||||
world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \
|
|
||||||
head_offset: [head_offset], practical_offset: [practical_offset]")
|
|
||||||
// VOREStation Edit End - Debugging
|
|
||||||
var/list/alltimers = list()
|
var/list/alltimers = list()
|
||||||
//collect the timers currently in the bucket
|
//collect the timers currently in the bucket
|
||||||
for (var/bucket_head in bucket_list)
|
for (var/bucket_head in bucket_list)
|
||||||
@@ -272,11 +256,6 @@ SUBSYSTEM_DEF(timer)
|
|||||||
|
|
||||||
alltimers += second_queue
|
alltimers += second_queue
|
||||||
if (!length(alltimers))
|
if (!length(alltimers))
|
||||||
// VOREStation Edit Start - Debugging
|
|
||||||
log_world("Finished Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \
|
|
||||||
world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \
|
|
||||||
head_offset: [head_offset], practical_offset: [practical_offset] (NO TIMERS)")
|
|
||||||
// VOREStation Edit End - Debugging
|
|
||||||
return
|
return
|
||||||
|
|
||||||
sortTim(alltimers, /proc/cmp_timer)
|
sortTim(alltimers, /proc/cmp_timer)
|
||||||
@@ -323,11 +302,7 @@ SUBSYSTEM_DEF(timer)
|
|||||||
alltimers.Cut(1, i+1)
|
alltimers.Cut(1, i+1)
|
||||||
second_queue = alltimers
|
second_queue = alltimers
|
||||||
bucket_count = new_bucket_count
|
bucket_count = new_bucket_count
|
||||||
// VOREStation Edit Start - Debugging
|
|
||||||
log_world("Finished Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \
|
|
||||||
world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \
|
|
||||||
head_offset: [head_offset], practical_offset: [practical_offset]")
|
|
||||||
// VOREStation Edit End - Debugging
|
|
||||||
|
|
||||||
/datum/controller/subsystem/timer/Recover()
|
/datum/controller/subsystem/timer/Recover()
|
||||||
second_queue |= SStimer.second_queue
|
second_queue |= SStimer.second_queue
|
||||||
@@ -421,8 +396,6 @@ SUBSYSTEM_DEF(timer)
|
|||||||
var/datum/timedevent/buckethead
|
var/datum/timedevent/buckethead
|
||||||
if(bucketpos > 0)
|
if(bucketpos > 0)
|
||||||
buckethead = bucket_list[bucketpos]
|
buckethead = bucket_list[bucketpos]
|
||||||
else // VOREStation Edit - Debugging
|
|
||||||
log_world("WARNING: non-positive bucket pos [bucketpos] for [src]! next=[next ? next : "NULL"] prev=[prev ? prev : "NULL"]") // VOREStation Edit - Debugging
|
|
||||||
if(buckethead == src)
|
if(buckethead == src)
|
||||||
bucket_list[bucketpos] = next
|
bucket_list[bucketpos] = next
|
||||||
SStimer.bucket_count--
|
SStimer.bucket_count--
|
||||||
|
|||||||
Reference in New Issue
Block a user