diff options
author | dfuehrer <dfuehrer@email.arizona.edu> | 2021-07-05 19:17:34 -0700 |
---|---|---|
committer | dfuehrer <dfuehrer@email.arizona.edu> | 2021-07-05 19:17:34 -0700 |
commit | c306fea42674a3ee0387a98a05724c4507cd90f9 (patch) | |
tree | 9bbbfe98b42a8507f7c13b42062a8ef19f067f1b /dwmblocks.c | |
parent | Merge branch 'master' into fastscroll_fix (diff) | |
download | dwmblocks-c306fea42674a3ee0387a98a05724c4507cd90f9.tar.gz dwmblocks-c306fea42674a3ee0387a98a05724c4507cd90f9.tar.bz2 dwmblocks-c306fea42674a3ee0387a98a05724c4507cd90f9.tar.xz dwmblocks-c306fea42674a3ee0387a98a05724c4507cd90f9.tar.zst dwmblocks-c306fea42674a3ee0387a98a05724c4507cd90f9.zip |
fixed a bug in interval time updating
Diffstat (limited to 'dwmblocks.c')
-rw-r--r-- | dwmblocks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dwmblocks.c b/dwmblocks.c index d4cc1a4..0969ed7 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -219,7 +219,7 @@ void statusloop() } unsigned int i = 0; int interrupted = 0; - struct timespec sleeptime = {interval, 0}; + const struct timespec sleeptime = {interval, 0}; struct timespec tosleep = sleeptime; getcmds(-1); while(statusContinue) @@ -234,7 +234,7 @@ void statusloop() getcmds(i); writestatus(); // then increment since its actually been a second (plus the time it took the commands to run) - i++; + i += interval; // set the time to sleep back to the sleeptime of 1s tosleep = sleeptime; } |