~kris/suckless

dwmblocks

ref: 95d7f502dfdc51ab35905cb8cef45fbfb4e36f85 dwmblocks/include/timer.h -rw-r--r-- 452 bytes
95d7f502 — Kris Yotam Update config: add pipe delimiter and reorder blocks 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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