stopTimer()
Purpose
Stop a timer
Description
Stop a timer that has been started with setTimer or startTimer
Syntax
stopTimer( handle )
Arguments
handle handle of the timer from settimer
Example
count = 10
handle = setTimer( 1, 11, showCount() )
stopTimer( handle )
loop
c = controls( 0 )
printAt( 0, 0, "Press A to start timer" )
if c.a then
startTimer( handle )
endIf
printAt( 0, 1, "Press B to stop timer" )
if c.b then
stopTimer( handle )
endIf
update()
repeat
function showCount()
clear()
textSize( 500 )
printAt( tWidth() / 2, tHeight() / 2, count )
textSize( 29 )
count -= 1
return void
Associated Commands