From 4b1afed1b3debea5d469be49657b17c09a0dc089 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Jan 2018 09:03:38 +0100 Subject: [PATCH] use glibc syscall wrapper for clock_gettime MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit These are available on any non-ancient system by now so it’s safe to drop them. --- src/timefunc.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) 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; -- 1.7.1