1
dnl Copyright (C) 2010 Monty Taylor
2
dnl This file is free software; Monty Taylor
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
6
#--------------------------------------------------------------------
7
# Check for clock_gettime
8
#--------------------------------------------------------------------
10
AC_DEFUN([PANDORA_CLOCK_GETTIME],[
11
AC_CACHE_CHECK([for working clock_gettime],[ac_cv_have_clock_gettime],[
14
#if TIME_WITH_SYS_TIME
15
# include <sys/time.h>
19
# include <sys/time.h>
26
int ret= clock_gettime(CLOCK_REALTIME, &tp);
28
ac_cv_have_clock_gettime=yes
30
ac_cv_have_clock_gettime=no
33
AS_IF([test "x${ac_cv_have_clock_gettime}" = xyes],[
34
AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have a working clock_gettime function])