Which way is better?
The documents say thread: https://www.ghielectronics.com/docs/31/watchdog
Watchdog.Enable(Watchdog.MAX_TIMEOUT);
new ST.Thread(() =>
{
while (true)
{
Watchdog.ResetCounter();
ST.Thread.Sleep((int)Watchdog.MAX_TIMEOUT - 1000);
}
}).Start();
or
GT.Timer timer = new GT.Timer(30000);
timer.Tick += (GT.Timer t) =>
{
WatchDog.ResetCounter();
};