KillTimer: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| No edit summary |  (changed the pos example) | ||
| Line 15: | Line 15: | ||
| ==Example==   | ==Example==   | ||
| This example  | This example kills all timers with a remaining time of less than 1 minute. | ||
| <syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
| -- Find and kill all the timers with less than 1 minute to go | |||
| killTimer (  | timers = getTimers ( 60000 ) | ||
| -- Loop through the timer list | |||
| for timerKey, timerValue in ipairs(timers) do | |||
| 	-- kill the timer | |||
|       killTimer ( timerValue ) | |||
| end | |||
| </syntaxhighlight> | </syntaxhighlight> | ||
| ==See Also== | ==See Also== | ||
| {{Utility functions}} | {{Utility functions}} | ||
Revision as of 16:58, 29 August 2007
This function allows you to kill/halt existing timers.
Syntax
bool killTimer ( int timerID )
Required Arguments
- timerID: The timer you wish to halt.
Returns
Returns true if a timer was successfully killed, false if no timer with the ID provided existed.
Example
This example kills all timers with a remaining time of less than 1 minute.
-- Find and kill all the timers with less than 1 minute to go
timers = getTimers ( 60000 )
-- Loop through the timer list
for timerKey, timerValue in ipairs(timers) do
	-- kill the timer
      killTimer ( timerValue )
end
See Also
- addDebugHook
- 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
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace