Question
Refresh a variable in custom time interval
I was trying out this plugin called "Timer Component". It basically provides us with a stopwatch functionality. We can also stop it automatically at some given time interval. I just tried to create a functionality where this plugin can be used to refresh a variable automatically in custom time intervals ( also less than 30 sec). Is it a good way to do it?
a!localVariables(
local!total: 50,
local!bool: false,
local!refreshAfter: 5,
{
stopWatchField(
/*label: "Stopwatch Timer",*/
labelPosition: "ABOVE",
validations: {},
height: "AUTO",
action: "START",
size: null,
align: null,
expiredMessage: null,
color: "#FFF",
style: null,
timerDirection: null,
enableReverseTimer: null,
reverseTimerColor: null,
secondsValue: local!total,
secondsSaveInto: {
a!save(
local!bool,
not(local!bool)
),
a!save(
local!total,
local!total-local!refreshAfter
),
if(
local!total<30,
a!save(local!total,50),
{}
)
},
enableAutoStop: true,
autoStopTimerSeconds: local!total-local!refreshAfter,
autoStopType: "AT"
)
}
)