Yes, I know, Javascript is single threaded, but I have a strange issue:
I wanted to detect when an important battery-operated sensor does not report for more than 2 hours. Therefore, I set a countdown to 2 hours. Each time the sensor delivers a value, the countdown is retriggered.
However, if there is no value for 2 hours, the countdown starts an alarm. This night I have now received 3 alarm messages only 3 minutes apart. So it seems that the retriggering did not work and 3 countdowns ran in parallel.
Any idea?
Yes, I know, Javascript is single threaded, but I have a strange issue: I wanted to detect when an important battery-operated sensor does not report for more than 2 hours. Therefore, I set a countdown to 2 hours. Each time the sensor delivers a value, the countdown is retriggered. However, if there is no value for 2 hours, the countdown starts an alarm. This night I have now received 3 alarm messages only 3 minutes apart. So it seems that the retriggering did not work and 3 countdowns ran in parallel. Any idea?