diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-06-08 22:00:43 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-06-08 22:00:43 +0200 |
commit | 81757c235ff8e112b4baabdd1ff23409426e9c98 (patch) | |
tree | ef213566ac3c17bf3d7795b0597f254791bd219e /include/timer.h | |
download | dwmblocks-async-81757c235ff8e112b4baabdd1ff23409426e9c98.tar.gz dwmblocks-async-81757c235ff8e112b4baabdd1ff23409426e9c98.tar.bz2 dwmblocks-async-81757c235ff8e112b4baabdd1ff23409426e9c98.zip |
update
Diffstat (limited to 'include/timer.h')
-rw-r--r-- | include/timer.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/timer.h b/include/timer.h new file mode 100644 index 0000000..1ec7f75 --- /dev/null +++ b/include/timer.h @@ -0,0 +1,21 @@ +#ifndef TIMER_H +#define TIMER_H + +#include <signal.h> +#include <stdbool.h> + +#include "block.h" + +#define TIMER_SIGNAL SIGALRM + +typedef struct { + unsigned int time; + const unsigned int tick; + const unsigned int reset_value; +} timer; + +timer timer_new(const block *const blocks, const unsigned short block_count); +int timer_arm(timer *const timer); +bool timer_must_run_block(const timer *const timer, const block *const block); + +#endif // TIMER_H |