setTimeInterval

Post Reply
ArielRauch
Advanced member
Posts: 230
Joined: Thu Aug 07, 2014 10:04 am

setTimeInterval

Post by ArielRauch »

I would like to know, if when I change the time interval within a specific script whether it changes the interval for the whole switch instance or only for the script.



Thanks



Ariel
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

setTimeInterval

Post by dkelly »

TLDR: per script instance





You can determine the behavior with this simple script. Create a flow that contains 2 instances of this script element. Name one of them "Instance 1", start flow and look at log entries.





function timerFired( s : Switch )

{

if (s.getElementName() == "Instance 1")

s.setTimerInterval(10);

else

s.setTimerInterval(30);



s.log(1, s.getElementName());

}

ArielRauch
Advanced member
Posts: 230
Joined: Thu Aug 07, 2014 10:04 am

setTimeInterval

Post by ArielRauch »

thank you!
Post Reply