Amount of elapsed/CPU time used (depending on OS)
Returns the approximate amount of CPU time used by the current process in seconds.
WARNING - under Linux and Mac OS os.clock returns the CPU time used. However, under Windows it returns the elapsed time that the process has been running (not the CPU time used). This is because the operating system call "clock" works differently under Windows.
See Also ...
os.date - Formats a date/time string
Lua base functions
(Help topic: lua=os.clock)
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )