IntegratedAlarmSystem-Group / ias-display

IAS Display, implemented in Angular
Other
1 stars 1 forks source link

Fix checking of last received timestamp #90

Closed sfehlandt closed 5 years ago

sfehlandt commented 5 years ago

Currenlty we receive global updates from the webserver every 'broadcastRate' seconds.

The display checks every 'broadcastThreshold' seconds (> broadcastRate), if the current time minus the timestamp of the last received message is greater than 'broadcastThreshold'.

This should work if this checking and the updates received from the Webserver are in sink. However, they could not be.

We should improve this, by checking the timestamp 'broadcastRate' seconds after each received message. Which would be the same than launching a countdown of broadcastRate seconds after the last reception of a message, restarting the countdown after each new message, and triggering a general invalidation if the countdown reaches 0.