ChangeInterval() and GetAttribute()
Posted: Wed Jan 08, 2025 3:25 pm
If you change an interval frequency using ChangeInterval(), GetAttribute(#INTERVAL, id, #ATTRDURATION) keeps returning the initially selected value.
And by the way, the manual entries of ChangeInterval( ) and GetAttribute() refer to a frequency in milliseconds, but that's not precise, as it is the period.
And by the way, the manual entries of ChangeInterval( ) and GetAttribute() refer to a frequency in milliseconds, but that's not precise, as it is the period.
Code: Select all
Function p_Main()
Print(".")
EndFunction
SetInterval(1, p_Main, 1000)
GetAttribute(#INTERVAL, 1, #ATTRDURATION)
DebugPrint("Period:",GetAttribute(#INTERVAL, 1, #ATTRDURATION))
ChangeInterval(1, 5000)
Repeat
DebugPrint("Period:",GetAttribute(#INTERVAL, 1, #ATTRDURATION))
WaitEvent()
Forever