Jump to content

Need some logic help with my timer (count down)


E1M1
 Share

Recommended Posts

Try this

$Timer = TimerInit()
$4Hours = (4 * 60 * 60 * 1000)

While 1
    ToolTip(Round($4Hours - TimerDiff($Timer), 0))
WEnd

or

#include <Date.au3>
Local $iHours, $iMins, $iSecs, $Timer = TimerInit()
Local $4Hours = (4 * 60 * 60 * 1000)
Local $Time, $oldTime

While 1
    _TicksToTime($4Hours - TimerDiff($Timer), $iHours, $iMins, $iSecs)
    $Time = StringFormat("%02i:%02i:%02i", $iHours, $iMins, $iSecs)
    If $Time <> $oldTime Then ToolTip($Time)
    $oldTime = $Time
    Sleep(10)
WEnd
Edited by Raupi
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...