Type Function Library os.* Return value Number Revision Current Public Release (2017.3135) Keywords os, clock, time, date See also system.getTimer() os.time() os.date()
Returns an approximation of the amount in seconds of CPU time used by the program.
This is a standard Lua function that returns the CPU in seconds. A run time of 5 seconds returns as 0.05. It counts from 0.00 to 0.99 before rolling over to 1.00.
print( os.clock() ) -- Outputs CPU time to terminal