os.clock
, you can compute (just about) the CPU time taken to execute a chunk of code.unit
: Unit of time to show the result in ('seconds', 'milliseconds', 'microseconds', or 'nanoseconds')decPlaces
: Number of decimal places to use when showing the elapsed timen
: Number of times to run the functionf
: Function to run...
: Arguments passed to function f