mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
Stuff
This commit is contained in:
@@ -416,12 +416,15 @@ SUBSYSTEM_DEF(timer)
|
|||||||
prev = next = null
|
prev = next = null
|
||||||
|
|
||||||
/datum/timedevent/proc/bucketJoin()
|
/datum/timedevent/proc/bucketJoin()
|
||||||
|
to_chat(world, "JOINING BUCKET")
|
||||||
var/list/L
|
var/list/L
|
||||||
|
|
||||||
if (flags & TIMER_CLIENT_TIME)
|
if (flags & TIMER_CLIENT_TIME)
|
||||||
L = SStimer.clienttime_timers
|
L = SStimer.clienttime_timers
|
||||||
|
to_chat(world, "DEBUG: inserting into clienttime timers")
|
||||||
else if (timeToRun >= TIMER_MAX)
|
else if (timeToRun >= TIMER_MAX)
|
||||||
L = SStimer.second_queue
|
L = SStimer.second_queue
|
||||||
|
to_chat(world, "DEBUG: Inserting into second queue")
|
||||||
|
|
||||||
if(L)
|
if(L)
|
||||||
BINARY_INSERT(src, L, datum/timedevent, timeToRun)
|
BINARY_INSERT(src, L, datum/timedevent, timeToRun)
|
||||||
@@ -430,19 +433,24 @@ SUBSYSTEM_DEF(timer)
|
|||||||
//get the list of buckets
|
//get the list of buckets
|
||||||
var/list/bucket_list = SStimer.bucket_list
|
var/list/bucket_list = SStimer.bucket_list
|
||||||
|
|
||||||
|
to_chat(world, "DEBUG: bucket list len [bucket_list.len]")
|
||||||
|
|
||||||
//calculate our place in the bucket list
|
//calculate our place in the bucket list
|
||||||
var/bucket_pos = BUCKET_POS(src)
|
var/bucket_pos = BUCKET_POS(src)
|
||||||
|
|
||||||
//get the bucket for our tick
|
//get the bucket for our tick
|
||||||
var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
|
var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
|
||||||
SStimer.bucket_count++
|
SStimer.bucket_count++
|
||||||
|
to_chat(world, "DEBUG: bucket pos [bucket_pos]")
|
||||||
//empty bucket, we will just add ourselves
|
//empty bucket, we will just add ourselves
|
||||||
if (!bucket_head)
|
if (!bucket_head)
|
||||||
bucket_list[bucket_pos] = src
|
bucket_list[bucket_pos] = src
|
||||||
|
to_chat(world, "DEBUG: src is bucket head")
|
||||||
return
|
return
|
||||||
//other wise, lets do a simplified linked list add.
|
//other wise, lets do a simplified linked list add.
|
||||||
if (!bucket_head.prev)
|
if (!bucket_head.prev)
|
||||||
bucket_head.prev = bucket_head
|
bucket_head.prev = bucket_head
|
||||||
|
to_chat(world, "DEBUG: src is not bucket head")
|
||||||
next = bucket_head
|
next = bucket_head
|
||||||
prev = bucket_head.prev
|
prev = bucket_head.prev
|
||||||
next.prev = src
|
next.prev = src
|
||||||
|
|||||||
@@ -353,3 +353,6 @@
|
|||||||
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
|
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
|
||||||
new /obj/effect/decal/remains/human(get_turf(src))
|
new /obj/effect/decal/remains/human(get_turf(src))
|
||||||
dismantle()
|
dismantle()
|
||||||
|
|
||||||
|
/proc/timertest(atom/A, time = 10)
|
||||||
|
QDEL_IN(A, time)
|
||||||
|
|||||||
@@ -674,14 +674,18 @@
|
|||||||
stat("Location:", "([x], [y], [z]) [loc]")
|
stat("Location:", "([x], [y], [z]) [loc]")
|
||||||
stat("CPU:","[world.cpu]")
|
stat("CPU:","[world.cpu]")
|
||||||
stat("Instances:","[world.contents.len]")
|
stat("Instances:","[world.contents.len]")
|
||||||
|
stat(null, "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)")
|
||||||
|
|
||||||
if(statpanel("Processes"))
|
if(statpanel("Processes"))
|
||||||
if(processScheduler)
|
if(processScheduler)
|
||||||
processScheduler.statProcesses()
|
processScheduler.statProcesses()
|
||||||
|
|
||||||
if(statpanel("MC"))
|
if(statpanel("MC"))
|
||||||
|
stat("Location:", "([x], [y], [z]) [loc]")
|
||||||
stat("CPU:","[world.cpu]")
|
stat("CPU:","[world.cpu]")
|
||||||
stat("Instances:","[world.contents.len]")
|
stat("Instances:","[world.contents.len]")
|
||||||
|
stat("World Time:", world.time)
|
||||||
|
stat("Real time of day:", REALTIMEOFDAY)
|
||||||
stat(null)
|
stat(null)
|
||||||
if(Master)
|
if(Master)
|
||||||
Master.stat_entry()
|
Master.stat_entry()
|
||||||
|
|||||||
Reference in New Issue
Block a user