From 411279afc10f58c9ee8a7e5599bd96c5ff32cd6c Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 1 Dec 2020 08:51:27 -0500 Subject: a more portable implementation for time measurements --- src/include/common.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/include') diff --git a/src/include/common.h b/src/include/common.h index 2fa61cc91..5df51c5a9 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -118,21 +118,6 @@ static inline int mac_not_zero(const unsigned char mac[6]) { return 0; } -// rtdsc timestamp on x86-64/amd64 processors -static inline unsigned long long getticks(void) { -#if defined(__x86_64__) - unsigned a, d; - asm volatile("rdtsc" : "=a" (a), "=d" (d)); - return ((unsigned long long)a) | (((unsigned long long)d) << 32); -#elif defined(__i386__) - unsigned long long ret; - __asm__ __volatile__("rdtsc" : "=A" (ret)); - return ret; -#else - return 0; // not implemented -#endif -} - void timetrace_start(void); float timetrace_end(void); int join_namespace(pid_t pid, char *type); -- cgit v1.2.3-54-g00ecf