Files
Aurora.3/code/modules/client/verbs/ping.dm
Fluffy 25dc248979 Updated statpanel and added client pings (#18337)
* SSatlas.current_map

* hardsuit spell tab appears to clear correctly

* sdfsa

* from the moment i understood the weakness of my flesh, it disgusted me

* sdf
2024-02-08 12:29:42 +00:00

23 lines
639 B
Plaintext

/client/verb/update_ping(time as num)
set instant = TRUE
set name = ".update_ping"
var/ping = pingfromtime(time)
lastping = ping
if (!avgping)
avgping = ping
else
avgping = MC_AVERAGE_SLOW(avgping, ping)
/client/proc/pingfromtime(time)
return ((world.time+world.tick_lag*TICK_USAGE_REAL/100)-time)*100
/client/verb/display_ping(time as num)
set instant = TRUE
set name = ".display_ping"
to_chat(src, SPAN_NOTICE("Round trip ping took [round(pingfromtime(time),1)]ms"))
/client/verb/ping()
set name = "Ping"
set category = "OOC"
winset(src, null, "command=.display_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")