diff --git a/include/villas/tsc.h b/include/villas/tsc.h index 6b689da5d..e643562f8 100644 --- a/include/villas/tsc.h +++ b/include/villas/tsc.h @@ -88,8 +88,14 @@ static inline uint64_t rdtsc() return tsc; } +__attribute__((unused,always_inline)) +static uint64_t tsc_now(struct tsc *t) +{ + return t->rdtscp_supported + ? rdtscp() + : rdtsc(); +} + int tsc_init(struct tsc *t); uint64_t tsc_rate_to_cycles(struct tsc *t, double rate); - -uint64_t tsc_now(struct tsc *t); diff --git a/lib/tsc.c b/lib/tsc.c index fa40f468a..8cdede979 100644 --- a/lib/tsc.c +++ b/lib/tsc.c @@ -75,10 +75,3 @@ uint64_t tsc_rate_to_cycles(struct tsc *t, double rate) { return t->frequency / rate; } - -uint64_t tsc_now(struct tsc *t) -{ - return t->rdtscp_supported - ? rdtscp() - : rdtsc(); -}