Revert "port tgstation/tgstation#52417"

This reverts commit 67e365cd1f.
This commit is contained in:
DragonTrance
2022-11-12 10:29:40 -05:00
parent 442fd4a0f5
commit 453201fe41
7 changed files with 7 additions and 80 deletions
+3 -8
View File
@@ -319,21 +319,19 @@ SUBSYSTEM_DEF(timer)
var/wait
var/hash
var/list/flags
var/source
var/spent = 0 //time we ran the timer.
var/name //for easy debugging.
//cicular doublely linked list
var/datum/timedevent/next
var/datum/timedevent/prev
/datum/timedevent/New(datum/callback/callBack, wait, flags, hash, source)
/datum/timedevent/New(datum/callback/callBack, wait, flags, hash)
var/static/nextid = 1
id = TIMER_ID_NULL
src.callBack = callBack
src.wait = wait
src.flags = flags
src.hash = hash
src.source = source
if (flags & TIMER_CLIENT_TIME)
timeToRun = REALTIMEOFDAY + wait
@@ -458,10 +456,7 @@ SUBSYSTEM_DEF(timer)
else
. = "[callBack.object.type]"
/*
* Do not call this directly. Instead, use the addtimer() macro, which includes source information
*/
/proc/_addtimer(datum/callback/callback, wait = 0, flags = 0, file, line)
/proc/addtimer(datum/callback/callback, wait = 0, flags = 0)
if (!callback)
CRASH("addtimer called without a callback")
@@ -502,7 +497,7 @@ SUBSYSTEM_DEF(timer)
else if(flags & TIMER_OVERRIDE)
stack_trace("TIMER_OVERRIDE used without TIMER_UNIQUE")
var/datum/timedevent/timer = new(callback, wait, flags, hash, file && "[file]:[line]")
var/datum/timedevent/timer = new(callback, wait, flags, hash)
return timer.id
/proc/deltimer(id)