mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Add support for clock_gettime_nsec_np()
Prefer clock_gettime_nsec_np(CLOCK_UPTIME_RAW) to mach_absolute_time().
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -2126,6 +2126,16 @@ if test "x${je_cv_clock_realtime}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_HAVE_CLOCK_REALTIME], [ ], [ ])
|
||||
fi
|
||||
|
||||
dnl Check for clock_gettime_nsec_np().
|
||||
JE_COMPILABLE([clock_gettime_nsec_np()], [
|
||||
#include <time.h>
|
||||
], [
|
||||
clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
|
||||
], [je_cv_clock_gettime_nsec_np])
|
||||
if test "x${je_cv_clock_gettime_nsec_np}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_HAVE_CLOCK_GETTIME_NSEC_NP], [ ], [ ])
|
||||
fi
|
||||
|
||||
dnl Use syscall(2) (if available) by default.
|
||||
AC_ARG_ENABLE([syscall],
|
||||
[AS_HELP_STRING([--disable-syscall], [Disable use of syscall(2)])],
|
||||
|
||||
Reference in New Issue
Block a user