blizzedout Posted February 25, 2006 Share Posted February 25, 2006 I want to find out the avg amound of seconds it takes for the: While statement to run. Like i want to use _NowTime() and a run count, and find the time difference from run 1 and run 2 then lets say you get 4 seconds adds that to a $time var, then divides that by a $runs var and bam you should be able to get it? Anyone know if this will work or aready have something liek this? Link to comment Share on other sites More sharing options...
greenmachine Posted February 25, 2006 Share Posted February 25, 2006 Try using TimerInit and TimerDiff. It will be much more accurate (milliseconds vs seconds). Link to comment Share on other sites More sharing options...
blizzedout Posted February 25, 2006 Author Share Posted February 25, 2006 Try using TimerInit and TimerDiff. It will be much more accurate (milliseconds vs seconds).thanks lol, just getting into the time section of AI Link to comment Share on other sites More sharing options...
blizzedout Posted February 25, 2006 Author Share Posted February 25, 2006 thanks lol, just getting into the time section of AI Cool through it together to see if it works and it does Average Time $Runs = 0 $Total= 0 While 1 $begin = TimerInit() sleep(1000) $dif = TimerDiff($begin) $Total = $Total + $dif $Runs = $Runs + 1 $avg = $Total / $Runs MsgBox(0,"Time Average","Total Time: " & $Total & @CRLF & "Average Time: " & $avg) Wend Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now