Opened 14 years ago

Closed 14 years ago

#1082 closed Bug (Works For Me)

TimerDiff results in negative values and resets.

Reported by: Zoster Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: timerdiff negative values Cc:


I'm getting strange results from TimerDiff in the following setup:

Global $gt_TimerLastAction = TimerInit()

While True

Func _TimerTest()
	$t_TimerDiff = TimerDiff($gt_TimerLastAction)
		Switch $t_TimerDiff
			Case 0 to 45000
				;Wait aleast 45sec
				ConsoleWrite("Still under 45sec: " & $t_TimerDiff & @CRLF)
			Case 45001 to 99000
				;Do action
				ConsoleWrite("Action: "& $t_TimerDiff & @CRLF)
				$gt_TimerLastAction = TimerInit()
			Case Else
				;Action overdue, reset
				ConsoleWrite("Overdue:" & $t_TimerDiff & @CRLF)
				$gt_TimerLastAction = TimerInit()

The first call produces a negative diff of -1864.62581138106.
In between the diff sometimes gets reduced from eg 14028.177324213 to 9461.37763319081 (between two case 45001) and some negative values also appear from time to time.

The variable is not being reset anywhere else in the program.

As far as I understand the TimerDiff function a negative value should be impossible.
Might this be a variant conversion problem or can the timer be reset anywhere else?

The application runs with AutoIt 3.3 on WinXP SP3 (Ger). It also uses some CommPort UDF (CommMG) and is remote controlled via Dameware.

Attachments (0)

Change History (2)

comment:1 Changed 14 years ago by Zoster

The problem is actually reproducable with the mockup code from above which I didn't expect. The code runs fine on another machine. My main suspect has become the CPU which is a AMD Geode.

From CPU-Z:

CPU-Z 1.50 report file
Number of processors 1
Number of cores 1 per processor
Number of threads 1 per processor
Name AMD Geode LX
Code Name Castle
Specification Geode(TM) Integrated Processor by AMD PCS
Package Socket 481 BGU
Family/Model/Stepping 5.A.2
Extended Family/Model 5.A
Core Stepping
Technology 0.13 um
Core Speed 499.9 MHz
Multiplier x Bus speed 15.0 x 33.3 MHz
Rated Bus speed 66.7 MHz
Instruction sets MMX (+), 3DNow! (+)
L1 Data cache (per processor) 64 KBytes, 16-way set associative, 32-byte line size
L1 Instruction cache (per processor) 64 KBytes, 16-way set associative, 32-byte line size
L2 cache (per processor) 128 KBytes, 4-way set associative, 32-byte line size
Chipset & Memory
Southbridge AMD ID2090 rev. 03
Memory Type
Memory Size 224 MBytes
System Manufacturer
System Name
System S/N
Mainboard Vendor
Mainboard Model AMD-GX3
BIOS Vendor Phoenix Technologies, LTD
BIOS Version 6.00 PG
BIOS Date 03/13/1907
Memory SPD
Windows Version Microsoft Windows XP Professional Service Pack 3 (Build 2600)
DirectX Version 9.0c

comment:2 Changed 14 years ago by Valik

  • Resolution set to Works For Me
  • Status changed from new to closed

Closing as works for me.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.