mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-05-27 15:56:22 +00:00
bsd compat
This commit is contained in:
@@ -78,7 +78,13 @@ INLINE long double get_now_monotonic(void) {
|
|||||||
time_t sec;
|
time_t sec;
|
||||||
long msec;
|
long msec;
|
||||||
|
|
||||||
|
# if defined(CLOCK_MONOTONIC_RAW)
|
||||||
get_now(CLOCK_MONOTONIC_RAW, &sec, &msec);
|
get_now(CLOCK_MONOTONIC_RAW, &sec, &msec);
|
||||||
|
# elif defined(CLOCK_MONOTONIC_FAST)
|
||||||
|
get_now(CLOCK_MONOTONIC_FAST, &sec, &msec);
|
||||||
|
# else
|
||||||
|
get_now(CLOCK_MONOTONIC, &sec, &msec);
|
||||||
|
# endif
|
||||||
return (long double)sec + ((long double)msec) / 1000;
|
return (long double)sec + ((long double)msec) / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user