Zog Posted December 2, 2022 Share Posted December 2, 2022 (edited) One of my staff brought to my attention the following quote from the documentation for TimerDiff: Quote Some processors are known to cause the function to return incorrect result. We use Autoit for some process control applications and often use TimerInit() and TimerDiff() This is concerning to me. Is there a list of processors know to have problems with TimerDiff()? What is the nature of the problem? Is it off by milliseconds or does it not work at all or what? Thank you in advance. Edited December 2, 2022 by Zog clarification Link to comment Share on other sites More sharing options...
Zog Posted December 5, 2022 Author Share Posted December 5, 2022 Is this the right forum to post this question? Link to comment Share on other sites More sharing options...
Nine Posted December 5, 2022 Share Posted December 5, 2022 Who can answer that question, you think ? If you have different processors in your hands, why don't you do the comparatives ? Let us know what you find ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
spudw2k Posted December 5, 2022 Share Posted December 5, 2022 (edited) On 12/2/2022 at 1:03 PM, Zog said: Is there a list of processors know to have problems with TimerDiff()? Not that I can find. Closest thing I found related to this issue is this: https://www.autoitscript.com/trac/autoit/ticket/2240 Edited December 5, 2022 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Nine Posted December 5, 2022 Share Posted December 5, 2022 Oh, sorry I forgot. CPU and computers haven't change in 10 years. LOL spudw2k 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Zog Posted December 5, 2022 Author Share Posted December 5, 2022 @Nine - great idea. Tomorrow I'll run the following on all the different configurations in the testing lab at work: Local $absDiff = 0 Local $cumulativeDiff = 0 Local $signedDiff For $i = 1 To 100 $begin = TimerInit() Sleep(5000) $signedDiff = 5000-TimerDiff($begin) $absDiff = ABS($signedDiff) $cumulativeDiff = $cumulativeDiff+$absDiff ConsoleWrite($i&@TAB&$signedDiff&@TAB&$absDiff&@TAB&$cumulativeDiff&@CRLF) Next ConsoleWrite("--"&@CRLF) ConsoleWrite("Average difference="&$cumulativeDiff/100&@CRLF) Exit Perhaps anyone interested could do that as well and post their results. My home PC is AMD Ryzen 7 5800 8-Core Processor 3.40 GHz. I found the average difference over the 100 tests to be 4.27MS - which doesn't seem too broken to me. I didn't realize this was a 10 year old issue! Link to comment Share on other sites More sharing options...
spudw2k Posted December 5, 2022 Share Posted December 5, 2022 In all fairness, just because there have been 10 years worth of new CPUs produced, doesn't mean this problem has gone away. I don't think it is that widespread of an issue though. You can always resort to using the time macros (@HOUR, @MIN, @SEC, @MSEC) if there are any significant time lapse measurement issues with TimerDiff. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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