Execution time test

Posted by Blainer on Tue 24 Nov 2009 12:42 AM — 4 posts, 24,024 views.

#0
What would be a simple way to test the time taken to execute a function?

I was thinking just a line where I want the timer to start and a line where I want it to finish.

USA #1
Template:post=7891
Please see the forum thread: http://gammon.com.au/forum/?id=7891.
Australia Forum Administrator #2

os.difftime is one way:

http://www.gammon.com.au/scripts/doc.php?lua=os.difftime

For more resolution, try GetInfo (232).
#3
Thanks WillFa that was my reason for wanting to know execution times. :)