Jump to content

Showing running time of timer


Recommended Posts

This function works properly:

$begin = TimerStart()

$dif = TimerStop($begin)

MsgBox(4096,"Time Difference",$dif)

But is it possible to display the running time without stopping the timer?

I tried several things without success.

Thanks in advance!

Johannes from Germany

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Link to post
Share on other sites

$begin = TimerStart()
$dif = TimerStop($begin)
MsgBox(4096,"Time Difference",$dif)
$dif = TimerStop($begin)
MsgBox(4096,"Time Difference",$dif)
$dif = TimerStop($begin)
MsgBox(4096,"Time Difference",$dif)

unless you restart the timer, it keeps going as far as I have seen.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to post
Share on other sites

Oh yea, and this might show it better.

$begin = TimerStart()
ProgressOn("Timer", TimerStop($begin)) 
sleep(500)
For $x=1 To 10
ProgressSet( 50,"", TimerStop($begin)) 
sleep(500)
Next

And finally one showing two simultaneous timers running apx 1 sec apart

$begin = TimerStart()
sleep(1000)
$begin2 = TimerStart()
ProgressOn("Timer", "")
sleep(500)
For $x=1 To 10
ProgressSet( 50,TimerStop($begin),TimerStop($begin2))
sleep(500)
Next
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...