Jump to content

Time Macro @min Or @sec Fails?


Recommended Posts

After a while an error is detected. (41 jump!)

Tested both Compiled or not in two pcs.

My Autoit files-> 06th May, 2006 - v3.1.1.123 (beta)

Is a Failure of Autoit?

;@YEAR&@MON&@MDAY&@HOUR&
$stamp=@MIN&@SEC
$i=$stamp
$past=TimerInit()
do
$stamp=@MIN&@SEC
If Abs($stamp-$i)> 10 then 
    MsgBox(0,"Error","On "&TimerDiff($past)&" milisecs "&Abs($stamp-$i)&" jump!")
    Exit
EndIf
SplashTextOn("",$stamp,100,15,-1,-1,1,"tahoma",8,400)
sleep(500)
$i=$stamp
$past=TimerInit()
until 1=0

This problem affects the File time-stamps also.(when creating or Writing a file, wrong timestamp is marking the file)

Edited by Amen
Link to comment
Share on other sites

Is a Failure of Autoit?

No.

In order to run infinitely, your code does not account for the hour crossover, among

several other deficiencies in logic, including, but not limited to, performing integer based

comparisions on string variables.

Edited by flyingboz

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

Right.Now i noticed that error is shown every 59th second of time.

Max of Min =59 not 99.Wrong to Substruct a time Stamp like this! The differnce must be calculated by converting the mininutes of the Timestamp into a seconds :)

thnxxx

Edited by Amen
Link to comment
Share on other sites

in simple...

our numeric system - based on 100

10-20-30-40-50-60-70-80-90-91-92-93-94-95-96-97-98-99-100

our time system ( sec, min and hours ) - based on 60

10-20-30-40-50-51-52-53-54-55-56-57-58-59-60

based on your approach

100 - 59 = 41

maybe this will help

;@YEAR&@MON&@MDAY&@HOUR&
$stamp=@MIN&@SEC
$i=$stamp
$past=TimerInit()
do
$stamp=@MIN&@SEC
SplashTextOn("",$stamp & @CRLF & $i & @CRLF & Abs($stamp-$i), 150, 40, 20, 20,1,"tahoma",8,400)
If Abs($stamp-$i)> 10 then
    MsgBox(0,"Error","On "&TimerDiff($past)&" milisecs "&Abs($stamp-$i)&" jump!")
    Exit
EndIf

sleep(500)
$i=$stamp
$past=TimerInit()
until 1=0

8)

Edited by Valuater

NEWHeader1.png

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...