2 ms·
If you want everything to be within 10 seconds, then you build a state-change tracker (which only tracks all state changes since last update) and then you send
by nl 4y ago
If you want everything to be within 10 seconds, then you build a state-change tracker (which only tracks all state changes since last update) and then you send the updates every 10 seconds.
Don't worry about debouncing - the state tracker should handle representing the 300 updates as a single state change, and if there are more then they just get sent in the next update 10 seconds later.