From a0a127b5c6395fc402861f95852b9624f9d2621f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 16 Dec 2020 16:59:26 +0100 Subject: Clean up includes --- utils/bench.h | 13 +++++++------ utils/uri_table.h | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'utils') diff --git a/utils/bench.h b/utils/bench.h index 7b8da82..a04996b 100644 --- a/utils/bench.h +++ b/utils/bench.h @@ -23,28 +23,29 @@ #define _POSIX_C_SOURCE 200809L -#include #include +typedef struct timespec BenchmarkTime; + static inline double -bench_elapsed_s(const struct timespec* start, const struct timespec* end) +bench_elapsed_s(const BenchmarkTime* start, const BenchmarkTime* end) { return ((end->tv_sec - start->tv_sec) + ((end->tv_nsec - start->tv_nsec) * 0.000000001)); } -static inline struct timespec +static inline BenchmarkTime bench_start(void) { - struct timespec start_t; + BenchmarkTime start_t; clock_gettime(CLOCK_REALTIME, &start_t); return start_t; } static inline double -bench_end(const struct timespec* start_t) +bench_end(const BenchmarkTime* start_t) { - struct timespec end_t; + BenchmarkTime end_t; clock_gettime(CLOCK_REALTIME, &end_t); return bench_elapsed_s(start_t, &end_t); } diff --git a/utils/uri_table.h b/utils/uri_table.h index 3b374bb..70635a3 100644 --- a/utils/uri_table.h +++ b/utils/uri_table.h @@ -23,6 +23,8 @@ #ifndef URI_TABLE_H #define URI_TABLE_H +#include "lv2/urid/urid.h" + #include #include -- cgit v1.2.1