From e4edbd26c6c15fd55864704316ea616267696b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 23 Dec 2022 11:10:37 +0100 Subject: [PATCH] modules: change min poll interval from 500ms to 250ms --- CHANGELOG.md | 1 + doc/yambar-modules-battery.5.scd | 2 +- doc/yambar-modules-cpu.5.scd | 2 +- doc/yambar-modules-disk-io.5.scd | 2 +- doc/yambar-modules-mem.5.scd | 2 +- doc/yambar-modules-network.5.scd | 2 +- modules/battery.c | 2 +- modules/cpu.c | 2 +- modules/disk-io.c | 2 +- modules/mem.c | 2 +- modules/network.c | 2 +- modules/script.c | 2 +- 12 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0590b13..a99a9c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ * mem: `interval` renamed to `poll-interval` * battery/network/script: `poll-interval` unit changed from seconds to milliseconds ([#244][244]). +* all modules: minimum poll interval changed from 500ms to 250ms. [244]: https://codeberg.org/dnkl/yambar/issues/244 diff --git a/doc/yambar-modules-battery.5.scd b/doc/yambar-modules-battery.5.scd index 045b3fa..ef7a6bd 100644 --- a/doc/yambar-modules-battery.5.scd +++ b/doc/yambar-modules-battery.5.scd @@ -60,7 +60,7 @@ the state *unknown* under other conditions. : How often, in milliseconds, to poll for capacity changes (default=*60000*). Set to `0` to disable polling (*warning*: many batteries do not support asynchronous reporting). Cannot be less - than 500ms. + than 250ms. # EXAMPLES diff --git a/doc/yambar-modules-cpu.5.scd b/doc/yambar-modules-cpu.5.scd index 400b2dd..090ccdd 100644 --- a/doc/yambar-modules-cpu.5.scd +++ b/doc/yambar-modules-cpu.5.scd @@ -32,7 +32,7 @@ total CPU usage. : int : no : Refresh interval of the CPU usage stats in milliseconds - (default=500). Cannot be less then 500ms. + (default=500). Cannot be less then 250ms. # EXAMPLES diff --git a/doc/yambar-modules-disk-io.5.scd b/doc/yambar-modules-disk-io.5.scd index 6f6c7dc..5203316 100644 --- a/doc/yambar-modules-disk-io.5.scd +++ b/doc/yambar-modules-disk-io.5.scd @@ -39,7 +39,7 @@ currently present in the machine. : int : no : Refresh interval of disk's stats in milliseconds (default=500). - Cannot be less then 500ms. + Cannot be less then 250ms. # EXAMPLES diff --git a/doc/yambar-modules-mem.5.scd b/doc/yambar-modules-mem.5.scd index 7d72256..fc0a9eb 100644 --- a/doc/yambar-modules-mem.5.scd +++ b/doc/yambar-modules-mem.5.scd @@ -34,7 +34,7 @@ mem - This module provides the memory usage : string : no : Refresh interval of the memory usage stats in milliseconds - (default=500). Cannot be less then 500ms. + (default=500). Cannot be less then 250ms. # EXAMPLES diff --git a/doc/yambar-modules-network.5.scd b/doc/yambar-modules-network.5.scd index a07a87f..8b8b507 100644 --- a/doc/yambar-modules-network.5.scd +++ b/doc/yambar-modules-network.5.scd @@ -74,7 +74,7 @@ address. : no : Periodically (in milliseconds) update the signal, rx+tx bitrate, and ul+dl speed tags. Setting it to 0 disables updates. Cannot be less - than 500ms. + than 250ms. # EXAMPLES diff --git a/modules/battery.c b/modules/battery.c index 87c0283..db00add 100644 --- a/modules/battery.c +++ b/modules/battery.c @@ -20,7 +20,7 @@ #include "../config-verify.h" #include "../plugin.h" -static const long min_poll_interval = 500; +static const long min_poll_interval = 250; static const long default_poll_interval = 60 * 1000; enum state { STATE_FULL, STATE_NOTCHARGING, STATE_CHARGING, STATE_DISCHARGING, STATE_UNKNOWN }; diff --git a/modules/cpu.c b/modules/cpu.c index a18cc9b..455d45d 100644 --- a/modules/cpu.c +++ b/modules/cpu.c @@ -21,7 +21,7 @@ #include "../particles/dynlist.h" #include "../plugin.h" -static const long min_poll_interval = 500; +static const long min_poll_interval = 250; struct cpu_stats { uint32_t *prev_cores_idle; diff --git a/modules/disk-io.c b/modules/disk-io.c index 2142b56..7bf48e8 100644 --- a/modules/disk-io.c +++ b/modules/disk-io.c @@ -17,7 +17,7 @@ #include "../particles/dynlist.h" #include "../plugin.h" -static const long min_poll_interval = 500; +static const long min_poll_interval = 250; struct device_stats { char *name; diff --git a/modules/mem.c b/modules/mem.c index 54f7f83..3a2eda7 100644 --- a/modules/mem.c +++ b/modules/mem.c @@ -18,7 +18,7 @@ #include "../log.h" #include "../plugin.h" -static const long min_poll_interval = 500; +static const long min_poll_interval = 250; struct private { diff --git a/modules/network.c b/modules/network.c index 423f1b9..6773fcf 100644 --- a/modules/network.c +++ b/modules/network.c @@ -34,7 +34,7 @@ #define UNUSED __attribute__((unused)) -static const long min_poll_interval = 500; +static const long min_poll_interval = 250; struct rt_stats_msg { struct rtmsg rth; diff --git a/modules/script.c b/modules/script.c index 2b97590..f0cc9a7 100644 --- a/modules/script.c +++ b/modules/script.c @@ -22,7 +22,7 @@ #include "../module.h" #include "../plugin.h" -static const long min_poll_interval = 500; +static const long min_poll_interval = 250; struct private { char *path;