Skip to main content

GetThreadWait

This function was added in DSL 1

Description

Returns the time until thread or the current thread will be allowed to update again. If a coroutine you created calls Wait, this function can be used with the current thread to get what time was passed.

function GetThreadWait(thread) --[[ ... ]] end

Parameters

  • thread?: thread|nil - (Optional) The thread to check the wait time for.

Return Values

  • milliseconds: number - The time in milliseconds until the thread will be allowed to update again.

Example

local thread = CreateThread(function()
Wait(1000)
print('This thread will not update for another', GetThreadWait(thread), 'milliseconds')
end)
print(GetThreadWait(thread))

-- Output:
--> 0
--> This thread will not update for another 1000 milliseconds

See Also