diff options
| author | Federico Angelilli <code@fedang.net> | 2024-09-12 01:29:32 +0200 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-09-12 01:29:32 +0200 |
| commit | bd8dbe03ead6c73f28df517f8873675108277bf5 (patch) | |
| tree | 3a63ef377a599d7b9cddc4e2e3184f8defe29756 /src/util.h | |
| parent | 2907d743760f74a01a77dca91c4f74ac849517b5 (diff) | |
Add effects
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -29,10 +29,20 @@ char *color_to_string(color_t *color); void color_print(FILE *stream, color_t *color); +struct timespec timespec_from_ms(long ms); + +long timespec_to_ms(struct timespec ts); + struct timespec timespec_diff(struct timespec a, struct timespec b); +struct timespec timespec_add(struct timespec a, struct timespec b); + +struct timespec timespec_div(struct timespec ts, int n); + bool timespec_greater(struct timespec a, struct timespec b); +bool timespec_zero(struct timespec ts); + void timespec_print(FILE *stream, struct timespec *ts); // Check if point (px, py) is inside a rectangle in (x, y), (x+w, y), (x, y+h) and (w+h, y+h) |
