ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getTimerDetails

Function

getTimerDetails

Server and clientTimersIdentical to MTA:SA

Returns the time until the timer's next call, the number of remaining repeats and the interval.

Syntax

int, int, int getTimerDetails(timer timer)

Arguments

timertimer
A timer from setTimer.

Returns

Remaining ms, remaining repeats (0 = endless), interval in ms; false if the timer does not exist.

Example

local t = setTimer(function() end, 5000, 3)
local left, repeats, interval = getTimerDetails(t)
print(left, repeats, interval)  -- ok. 5000, 3, 5000

See also