ChangeInterval() and GetAttribute()

Report any Hollywood bugs here
Post Reply
Flinx
Posts: 282
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

ChangeInterval() and GetAttribute()

Post by Flinx »

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.

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
User avatar
airsoftsoftwair
Posts: 5673
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ChangeInterval() and GetAttribute()

Post by airsoftsoftwair »

Clearly a bug, will be fixed, thanks for reporting!
Post Reply