From: Philipp Gesang Date: Mon, 29 Jan 2018 08:03:38 +0000 (+0100) Subject: use glibc syscall wrapper for clock_gettime X-Git-Tag: v2.10~4 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=4b1afed1b3debea5d469be49657b17c09a0dc089;p=libi2ncommon use glibc syscall wrapper for clock_gettime These are available on any non-ancient system by now so it’s safe to drop them. --- diff --git a/src/timefunc.cpp b/src/timefunc.cpp index 245c95e..e8b1917 100644 --- a/src/timefunc.cpp +++ b/src/timefunc.cpp @@ -37,7 +37,6 @@ on this file might be covered by the GNU General Public License. #include #include #include -#include #include #include @@ -723,7 +722,7 @@ Intervals& Intervals::operator-=(const Intervals& other) bool monotonic_clock_gettime(long int& seconds, long int& nano_seconds) { struct timespec tp[1]; - int res= ::syscall(__NR_clock_gettime, CLOCK_MONOTONIC, tp); + int res= clock_gettime (CLOCK_MONOTONIC, tp); if (0 == res) { seconds= tp->tv_sec; @@ -762,7 +761,7 @@ long long monotonic_clock_gettime_nano() bool realtime_clock_gettime(long int& seconds, long int& nano_seconds) { struct timespec tp[1]; - int res= ::syscall(__NR_clock_gettime, CLOCK_REALTIME, tp); + int res= clock_gettime(CLOCK_REALTIME, tp); if (0 == res) { seconds= tp->tv_sec;