PauseTimer: Difference between revisions
From Onset Developer Wiki
No edit summary |
FlyingFork (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
function pauseTimers() | |||
for index, timer in ipairs(GetAllTimers()) do | |||
PauseTimer(timer) | |||
end | |||
end | |||
function resumeTimers() | |||
for index, timer in ipairs(GetAllTimers()) do | |||
UnpauseTimer(timer) | |||
end | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:TimerFunctions}} |
Latest revision as of 17:16, 27 May 2021
Description
Pauses the specified timer.
Syntax
PauseTimer(timer)
Parameters
- timer
The timer identifier
Return Value
- Returns true on success, false on error.
Example
function pauseTimers()
for index, timer in ipairs(GetAllTimers()) do
PauseTimer(timer)
end
end
function resumeTimers()
for index, timer in ipairs(GetAllTimers()) do
UnpauseTimer(timer)
end
end