diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-03-08 15:21:28 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-03-08 15:21:28 +0900 |
| commit | 4437d5b3c3eea76f6e2b0fd4a2ba21c02a098aeb (patch) | |
| tree | e8dcb20bf144aacf88f93b012dccacdeb08015cd /dwmblocks/include/timer.h | |
| parent | c2b06f0d5795a789f4ddab459179ff89aedfee98 (diff) | |
updates
Diffstat (limited to 'dwmblocks/include/timer.h')
| -rw-r--r-- | dwmblocks/include/timer.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dwmblocks/include/timer.h b/dwmblocks/include/timer.h new file mode 100644 index 0000000..1ec7f75 --- /dev/null +++ b/dwmblocks/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 |
