Hi,
Each time my script is running, my mono process is almost at 100%.
I have no idea how can i reduce the cpu use ...
Usually in script i use the :
Program.Setup( () => {
Program.AddInputField("Test.Capteur", "", "Nom du capteur à tester");
});
return true;
---
When.ModuleParameterChanged( (module, parameter) =>
But in that case, i want to do that all the time. More over, if the zwave signal is jamming i will probably have no "ModuleParameterChanged" so it's useless ..
Someone as an idea ?
My script :
while (Program.IsEnabled)
{
Program.RunAsyncTask(()=>
{
parameter.RequestUpdate(); // this will store current parameter timestamp
if (parameter.WaitUpdate(60)) // will check against previously stored timestamp
{
var freshValue = parameter.Value;
Program.Notify("Ok", "Updates from Status.Level within latest 60 seconds");
}
else
{
Program.Notify("Ko", "Update failed from Status.Level within latest 60 seconds");
}
});
}
Bye