Jump to content
  • 0

timing of execution of function


Platonic

Question

2 answers to this question

Recommended Posts

"os.clock" function can be used to measure elapsed time: 

local start = os.clock()
-- code to measure execution time of 
local execTime = os.clock() - start
print("Execution took " .. exexTime .. " seconds")
Link to comment
Share on other sites

On 3/3/2022 at 11:07 PM, CmP said:

"os.clock" function can be used to measure elapsed time: 

local start = os.clock()
-- code to measure execution time of 
local execTime = os.clock() - start
print("Execution took " .. exexTime .. " seconds")

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.