mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
use CLOCK_REALTIME_COARSE if available.
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
inline static void
|
||||
gettime (struct timespec *t)
|
||||
{
|
||||
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME)
|
||||
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME_COARSE)
|
||||
clock_gettime (CLOCK_REALTIME_COARSE, t);
|
||||
#elif defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME)
|
||||
clock_gettime (CLOCK_REALTIME, t);
|
||||
#else
|
||||
struct timeval tv;
|
||||
|
||||
Reference in New Issue
Block a user