mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 14:35:57 +01:00
19 lines
393 B
C
19 lines
393 B
C
|
#ifndef TIMESPEC_UTIL_H
|
||
|
#define TIMESPEC_UTIL_H
|
||
|
|
||
|
#include <time.h>
|
||
|
#include <stdbool.h>
|
||
|
#include <stdint.h>
|
||
|
|
||
|
#define TIMESPEC_NSEC_PER_SEC 1000000000L
|
||
|
|
||
|
void timespec_add(struct timespec *t, int64_t delta_ns);
|
||
|
|
||
|
bool timespec_less(struct timespec *t1, struct timespec *t2);
|
||
|
|
||
|
bool timespec_is_zero(struct timespec *t);
|
||
|
|
||
|
int64_t timespec_diff_ns(struct timespec *t1, struct timespec *t2);
|
||
|
|
||
|
#endif
|