mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-18 19:43:02 +01:00
Change all sleep(1)s into sleep(world.tick_lag)s
This commit is contained in:
@@ -17,7 +17,7 @@ TGS_DEFINE_AND_SET_GLOBAL(tgs, null)
|
||||
world.sleep_offline = FALSE // https://www.byond.com/forum/post/2894866
|
||||
del(world)
|
||||
world.sleep_offline = FALSE // just in case, this is BYOND after all...
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
TGS_DEBUG_LOG("BYOND DIDN'T TERMINATE THE WORLD!!! TICK IS: [world.time], sleep_offline: [world.sleep_offline]")
|
||||
|
||||
/datum/tgs_api/latest
|
||||
@@ -69,6 +69,6 @@ TGS_PROTECT_DATUM(/datum/tgs_api)
|
||||
|
||||
/datum/tgs_api/proc/Visibility()
|
||||
return TGS_UNIMPLEMENTED
|
||||
|
||||
|
||||
/datum/tgs_api/proc/TriggerEvent(event_name, list/parameters, wait_for_completion)
|
||||
return FALSE
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
var/json = json_encode(data)
|
||||
|
||||
while(requesting_new_port && !override_requesting_new_port)
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
|
||||
//we need some port open at this point to facilitate return communication
|
||||
if(!world.port)
|
||||
@@ -209,7 +209,7 @@
|
||||
requesting_new_port = FALSE
|
||||
|
||||
while(export_lock)
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
export_lock = TRUE
|
||||
|
||||
last_interop_response = null
|
||||
@@ -217,7 +217,7 @@
|
||||
text2file(json, server_commands_json_path)
|
||||
|
||||
for(var/I = 0; I < EXPORT_TIMEOUT_DS && !last_interop_response; ++I)
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
|
||||
if(!last_interop_response)
|
||||
TGS_ERROR_LOG("Failed to get export result for: [json]")
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
TGS_DEBUG_LOG("RequireInitialBridgeResponse: Starting sleep")
|
||||
logged = TRUE
|
||||
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
|
||||
TGS_DEBUG_LOG("RequireInitialBridgeResponse: Passed")
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
pending_events[event_id] = TRUE
|
||||
|
||||
do
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
while(pending_events[event_id])
|
||||
|
||||
TGS_DEBUG_LOG("Completed wait on event ID: [event_id]")
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if(detached)
|
||||
// Wait up to one minute
|
||||
for(var/i in 1 to 600)
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
if(!detached && (!require_channels || length(chat_channels)))
|
||||
break
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ var/run_bridge_test
|
||||
DetachedChatMessageQueuingP2()
|
||||
|
||||
/proc/DetachedChatMessageQueuingP2()
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
DetachedChatMessageQueuingP3()
|
||||
|
||||
/proc/DetachedChatMessageQueuingP3()
|
||||
@@ -240,7 +240,7 @@ var/received_health_check = FALSE
|
||||
DelayCheckDetach()
|
||||
|
||||
/proc/DelayCheckDetach()
|
||||
sleep(1)
|
||||
sleep(world.tick_lag)
|
||||
// hack hack, calling world.TgsChatChannelInfo() will try to delay until the channels come back
|
||||
var/datum/tgs_api/v5/api = TGS_READ_GLOBAL(tgs)
|
||||
if(length(api.chat_channels))
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
text2file(reason, "test_fail_reason.txt")
|
||||
world.log << "Terminating..."
|
||||
del(world)
|
||||
sleep(1) // https://www.byond.com/forum/post/2894866
|
||||
sleep(world.tick_lag) // https://www.byond.com/forum/post/2894866
|
||||
|
||||
Reference in New Issue
Block a user