Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
I want to make something that gets the time of when the function is finished( for eg. a command), like for checking the speed of the function but i don't get it. Please show me how to do it except from giving links, thank you.
Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
Thats not working please somebody help me fast.
Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
I would be realy great full if you explained this too me a little bit because i keep getting 0 on console.
Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
I am using it on a command, to check the speed of the command.
Posts: 973
Threads: 11
Joined: Mar 2008
Reputation:
0
Yeah, i probably should have done that from the begging, but i was in the middle of something.
GetTickCount returns how long your server has been up in milliseconds. 1000 milliseconds is equal to 1 second, so you can see how using ms is better than seconds for benchmarking :P.
The return value of GetTickCount is normally very high number, such as: 550861941. subtracting a new tick from the tick you stored before your function/command will give your time:
550861946 - 550861941 = 5.
So, newtick-oldtick = time_in_ms. I cant think of any other way to explain it so, hope you get it now aha.