From 80e54ac888d6232d99a485c74071fc2173f3dfbf Mon Sep 17 00:00:00 2001 From: Mete Durlu Date: Fri, 10 Jun 2022 10:13:33 +0200 Subject: [PATCH] hyptop: increase initial update interval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increase initial update interval from 200ms to 1 seconds to avoid fluctuations on the initial data output. Signed-off-by: Mete Durlu Signed-off-by: Jan Höppner --- hyptop/sd.h | 2 +- hyptop/sd_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hyptop/sd.h b/hyptop/sd.h index 9ba31929..1aed7074 100644 --- a/hyptop/sd.h +++ b/hyptop/sd.h @@ -17,7 +17,7 @@ #include "helper.h" #include "table.h" -#define SD_DG_INIT_INTERVAL_MS 200 +#define SD_DG_INIT_INTERVAL_SEC 1 #define SD_SYS_ID_SIZE 9 /* diff --git a/hyptop/sd_core.c b/hyptop/sd_core.c index f1cb6314..47b5b590 100644 --- a/hyptop/sd_core.c +++ b/hyptop/sd_core.c @@ -150,7 +150,7 @@ void sd_update(void) */ void sd_dg_register(struct sd_dg *dg, int has_core_data) { - struct timespec ts = {0, SD_DG_INIT_INTERVAL_MS * 1000000}; + struct timespec ts = {SD_DG_INIT_INTERVAL_SEC, 0}; struct sd_sys_item *sys_item; struct sd_cpu_item *cpu_item; unsigned int i;