Sign in to follow this  
Followers 0
jlorenz1

Showing the running time of the timer

3 posts in this topic

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 :whistle:


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

Share this post


Link to post
Share on other sites



Johannes,

This will show the splashtext screen and update it ....

$begin = TimerStart()

$W_Title = "Progress Window"

while 1

Showstatus("Running for:" & TimerStop($begin))

sleep(1000)

wend

Func ShowStatus($msg)

if Not WinExists($W_Title,"") then

    SplashTextOn($W_Title,$msg,300,100,1,1,6,"Arial",10,600)

else

    ControlSetText($W_Title,"","Static1",$msg)

EndIf

EndFunc


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

TimerStop doesn't actually "stop" the timer it just gives you the difference of the current time and the "base" time. So you can keep using TimerStop with the original return value of TimerStart.

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  
Followers 0