system.getTimer()

Type Function
Library system.*
Return value Number
Revision Release 2024.3703
Keywords system timer, timer, time, millisecond

Overview

Returns time in milliseconds since application launch. The fractional part of the returned value may return microseconds if the hardware supports it.

Notes
  • This value is unaffected by system clock changes and it always counts up.
  • This value will be affected (paused) when the app is suspended.

Syntax

system.getTimer()

Examples

print( system.getTimer() )  -- Displays the time running (in milliseconds)