Timer running

From Sim Innovations Wiki
Revision as of 15:21, 17 February 2016 by Admin (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

running = timer_running(timer_id)

timer_running is used to check if the timer is currently running.

Return value

Argument Type Description
running Boolean Returns true when the timer is running, false if it isn't.

Arguments

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

Example

-- Start a timer
timer_id = timer_start(0,1000,nil)

-- Check if the timer is running
if timer_running(timer_id) then
  print("The timer is running!")
else
  print("The timer is not running...")
end