• Reference
  • LUA API
  • Classes
  • Timer

Timer

The timer is accurate to milliseconds. A callback function will be executed every time the timer expires.

Functions

get_elapsed_time

Get the elapsed time of the timer.

Return

TypeDescription
numberThe elapsed time of the timer
timer:get_elapsed_time()

get_init_count

Get the initial count of the timer.

Return

TypeDescription
integerInitial count
timer:get_init_count()

get_remaining_time

Get the remaining time of the timer.

Return

TypeDescription
numberRemaining time.
timer:get_remaining_time()

get_remaining_count

Get the remaining count of the timer.

Return

TypeDescription
integerRemaining count.
timer:get_remaining_count()

get_time_out_time

Get the time the timer was set for.

Return

TypeDescription
numberTime set.
timer:get_time_out_time()