Jump to content
Sign in to follow this  

Find the avg seconds

Recommended Posts

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?

Share this post

Link to post
Share on other sites

thanks lol, just getting into the time section of AI

Cool through it together to see if it works and it does :o

Average Time

$Runs = 0
$Total= 0
While 1
$begin = TimerInit()
$dif = TimerDiff($begin)
$Total = $Total + $dif
$Runs = $Runs + 1
$avg = $Total / $Runs
MsgBox(0,"Time Average","Total Time: " & $Total & @CRLF & "Average Time: " & $avg)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...