Ergo: This code would than actually be counting from the new AdlibRegister() timepoint. Instead of (kinda) behaving like there was no AdlibUnRegister() call at all.
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 Global Const $iRatio = 100 ;; 1000 Global Const $sAdlib = 'AdlibFunc' Global $iTimer = 0 $iTimer = TimerInit() AdlibRegister($sAdlib, 4 * $iRatio) Sleep((4 * 5 * $iRatio) + $iRatio) AdlibUnRegister($sAdlib) Exit #cs result: AdlibFunc(), 409.264650422213 (+4) AdlibFunc(), 799.788431372549 (+4) AdlibFunc(), 1207.94519428939 (+4) AdlibFunc(), 1616.18206347503 (+4) AdlibFunc(), 2013.64021504222 (+4) #ce Func AdlibFunc() DebugOut('AdlibFunc(), ' & TimerDiff($iTimer)) AdlibUnRegister($sAdlib) sleep(3*$iRatio) ;; some simulated processing time. AdlibRegister($sAdlib, 4 * $iRatio) EndFunc Func DebugOut($sMsg) ConsoleWrite($sMsg & @CRLF) EndFunc
[3.3.8.1/3.3.9.4]
---
GOTO message http://www.autoitscript.com/forum/topic/141749-adlib-timing-behavior-adlibunregister/#entry997403 to skip confusing parts. (That would be message #10) (using stupid full http link, as forum post-editor is bugged to no end.)
Edited by MvGulik, 25 June 2012 - 07:15 AM.





