ResetTimer: Difference between revisions
Jump to navigation
Jump to search
m (resetTimer exists client side.) |
|||
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local timer = setTimer(example,3000,1) | |||
function example() | |||
outputChatBox("3 seconds has passed.") | |||
resetTimer(timer) | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 02:36, 20 April 2012
This function allows you to reset the elapsed time in existing timers to zero. The function does not reset the 'times to execute' count on timers which have a limited amout of repetitions.
Syntax
bool resetTimer ( timer theTimer )
Required Arguments
- theTimer: The timer whose elapsed time you wish to reset.
Returns
Returns true if the timer was successfully reset, false otherwise.
Example
local timer = setTimer(example,3000,1) function example() outputChatBox("3 seconds has passed.") resetTimer(timer) end
See Also
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub