E1M1 Posted January 9, 2011 Share Posted January 9, 2011 Hi I am tryng to make program that tells how much time i have left until given time. But it gives something that isnt right... negative time $4HoursLater = TimerInit() + (4*60*1000); Add 4 hours to current time While 1 tooltip($4HoursLater - TimerInit());Shouldnt be negative. WEnd edited Link to comment Share on other sites More sharing options...
enaiman Posted January 9, 2011 Share Posted January 9, 2011 Try 4*60*60*1000 SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Raupi Posted January 10, 2011 Share Posted January 10, 2011 (edited) 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 January 10, 2011 by Raupi Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now