blob: 6790120a59650ef21e60e9f5ffc786cb33bccd2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef HYBBX_POSIX_TIME_H
#define HYBBX_POSIX_TIME_H
/*
* clock_gettime(CLOCK_MONOTONIC) and usleep() on glibc/Linux (GCC 15+ C99).
* Include before <time.h> / <unistd.h> in .c files, or rely on CMake
* _DEFAULT_SOURCE on Linux builds.
*/
#if defined(__linux__) || defined(__GLIBC__)
#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE 1
#endif
#endif
#include <time.h>
#if !defined(_WIN32)
#include <unistd.h>
#endif
#endif /* HYBBX_POSIX_TIME_H */
|