Timer stop

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

timer_stop(timer_id)

timer_stop is used to stop a previously started timer.

Return value

This function won't return a value.

Arguments

# Argument Type Description
1 timer_id Number Timer_id received from the timer_start function.

Example

myimage1 = img_add_fullscreen("myimage.png")
 
rotation = 0
 
-- This function will be called every second
function timer_callback()
    img_rotate(myimage1,rotation)
 
    rotation = rotation + 1
end
 
mytimer1 = timer_start(0,1000,timer_callback)

-- Stop the timer right away
timer_stop(mytimer1)