Files
VOREStation/code/modules/client/verbs/ping.dm
2024-10-02 21:10:31 +02:00

13 lines
426 B
Plaintext

/client/proc/pingfromtime(time)
return ((world.time+world.tick_lag*world.tick_usage/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*world.tick_usage/100]")