summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 21:21:53 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-25 21:21:53 -0600
commit5a05816fd3f72af325d306a461941e0eb4509470 (patch)
tree301890f226e4e1a2bc636f318811546ffa4dad10
parent4e9ac9b9115b593aaefb0d1c281a35db3f87c953 (diff)
downloadztop-5a05816fd3f72af325d306a461941e0eb4509470.tar.gz
ztop: -d takes its interval
-rw-r--r--src/ztop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ztop.c b/src/ztop.c
index 11b553f..526dfb1 100644
--- a/src/ztop.c
+++ b/src/ztop.c
@@ -589,13 +589,13 @@ static void run_oneshot(unsigned mask, bool dump)
exit(rc);
}
-static void run_tui(unsigned mask)
+static void run_tui(unsigned mask, int interval)
{
static struct app a;
struct tui t;
memset(&a, 0, sizeof a);
- a.interval = 2;
+ a.interval = interval;
a.all = (mask & 0xFu) == 0xFu;
for (int i = 0; i < 4; i++) {
a.info[i].area = (unsigned)(i + 1);
@@ -736,7 +736,7 @@ int main(int argc, char **argv)
interval = 2;
if (interval > 60)
interval = 60;
- run_tui(mask);
+ run_tui(mask, interval);
} else {
run_oneshot(mask, dump);
}