﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1633	Second AdlibRegister function starts at once when first function is to slow	funkey	Jon	"If you have at least two funtions startet by AdlibRegister an one function is to slow, then the second one starts at once.
See the example. Try with less and more sleep time.

{{{
Opt('GUIOnEventMode', 1)
GUICreate(""Bugtest AdlibRegister"", 300, 50)
GUISetOnEvent(-3, ""_Exit"")

GUICtrlCreateCheckbox(""Switch adlib function"", 10, 20)
GUICtrlSetOnEvent(-1, ""_StartAdlib"")
GUICtrlSetState(-1, 4)

GUISetState()
AdlibRegister(""_Something"", 100)

While 1
	Sleep(100000)
WEnd

Func _StartAdlib()
	Local $CheckBoxState = GUICtrlRead(@GUI_CtrlId)
	ToolTip($CheckBoxState)
	If $CheckBoxState = ""1"" Then
		AdlibRegister(""_Adlib"", 60000 * 10)	;10 Minutes
		ConsoleWrite(""1"" & @cr)
	Else
		AdlibUnRegister(""_Adlib"")
		ConsoleWrite(""0"" & @cr)
	EndIf
EndFunc

Func _Something()
	Sleep(50)	; with 50 msec delay sometimes _Adlib() is called!
;~ 	Sleep(100)	; with 100 msec delay _Adlib() is called allways!
EndFunc

Func _Adlib()
	ConsoleWrite(""Adlib function called!!"" & @cr)
EndFunc

Func _Exit()
	Exit
EndFunc

}}}"	Bug	closed	3.3.7.7	AutoIt	3.3.6.0	None	Fixed		
