Page 1 of 1

Mod time

PostPosted: Thu Apr 11, 2013 10:01
by jojoa1997
Is there some way i could figure out how long actions take in ms. Mainly I want to test startup time and sped of the modd

PostPosted: Thu Apr 11, 2013 10:19
by PilzAdam
os:clock()

PostPosted: Thu Apr 11, 2013 10:50
by jojoa1997
do i add anything else and this goes at the betgining or where i want to find out how long

PostPosted: Thu Apr 11, 2013 11:42
by PilzAdam
You cant figure that out yourself?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local start = os:clock()
-- code here
print("time for code: "..(os:clock()-time))