add clock_gettime for macos 10.11 and earlier
This commit is contained in:
@@ -13,10 +13,6 @@ int gettimeofday(struct timeval *tp, void *tzp);
|
||||
#include_next <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_MONOTONIC
|
||||
#define CLOCK_MONOTONIC CLOCK_REALTIME
|
||||
#endif
|
||||
|
||||
#ifndef timersub
|
||||
#define timersub(tvp, uvp, vvp) \
|
||||
do { \
|
||||
|
@@ -22,6 +22,19 @@ struct tm *__gmtime_r(const time_t * t, struct tm * tm);
|
||||
time_t timegm(struct tm *tm);
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_MONOTONIC
|
||||
#define CLOCK_MONOTONIC CLOCK_REALTIME
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
int
|
||||
clock_gettime(clockid_t clock_id, struct timespec *tp);
|
||||
#endif
|
||||
|
||||
#ifndef timespecsub
|
||||
#define timespecsub(tsp, usp, vsp) \
|
||||
do { \
|
||||
|
Reference in New Issue
Block a user