diff options
| author | xengineering <me@xengineering.eu> | 2025-12-20 13:05:09 +0100 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2025-12-20 13:05:09 +0100 |
| commit | 7bc3ce328d61c1afe138802ded812d718b056257 (patch) | |
| tree | ddb006f1a11dd5831bab8749d99b5a2eb35f7b76 | |
| parent | 853e3fd5f2b4e622d4e35c0e3c2fad6c358cb8ae (diff) | |
| download | sia-server-7bc3ce328d61c1afe138802ded812d718b056257.tar sia-server-7bc3ce328d61c1afe138802ded812d718b056257.tar.zst sia-server-7bc3ce328d61c1afe138802ded812d718b056257.zip | |
Reduce polling period to 50 ms
The human reaction time is roughly 100 ms. The Nyquist-Shannon
sampling theorem [1] is used for an approximation how often it is
required to sample without humans noticing any delays.
[1]: https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
| -rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -21,7 +21,7 @@ const ( RETAINED = false MQTT_CONNECT_TIMEOUT = time.Second * 5 MQTT_DISCONNECT_TIMEOUT_US = 500 - POLLING_PERIOD = 500 * time.Millisecond + POLLING_PERIOD = 50 * time.Millisecond ) func main() { |
