Jump to content

_tickstotime lol?


fataly
 Share

Recommended Posts

My problems is this, when i start this, its only show 1 sec alltime, not move to sec 2 or 3 etc..

how i get time to move?

#include <date.au3>

While 1

Dim $begin, $diff, $hours, $mins, $seconds

$begin = TimerInit()

Sleep(1000)

$diff =Int( TimerDiff($begin))

_TicksToTime($diff,$hours,$mins,$seconds)

$AllTime = "Elapsed Time"& $hours & "hours " & $mins & "mins " & $seconds & "secs"

SplashTextOn("time table", @CRLF _

& "==============================" & @CRLF _

& "Total Time: " & $AllTime & @CRLF _

& "==============================", 200, 300, 1070 , 0 ,2 ,"", 8, "")

WEnd

Link to comment
Share on other sites

  • Developers

By not resetting the base time each loop :P

#include <date.au3>
Dim $begin, $diff, $hours, $mins, $seconds
$begin = TimerInit()
While 1
    Sleep(1000)
    $diff = Int(TimerDiff($begin))
    _TicksToTime($diff, $hours, $mins, $seconds)
    $AllTime = "Elapsed Time" & $hours & "hours " & $mins & "mins " & $seconds & "secs"
    SplashTextOn("time table", @CRLF _
             & "==============================" & @CRLF _
             & "Total Time: " & $AllTime & @CRLF _
             & "==============================", 200, 300, 1070, 0, 2, "", 8, "")
WEnd

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...