Mod time

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

Mod time

by jojoa1997 » Thu Apr 11, 2013 10:01

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
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu Apr 11, 2013 10:19

os:clock()
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Thu Apr 11, 2013 10:50

do i add anything else and this goes at the betgining or where i want to find out how long
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu Apr 11, 2013 11:42

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))
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron