Move {start,end}_cpu_timing into util.c

This commit is contained in:
Oliver Jowett 2017-01-27 12:33:43 +00:00
parent b1149f344d
commit bfc4b742af
3 changed files with 24 additions and 16 deletions

6
util.h
View file

@ -36,4 +36,10 @@ int64_t receiveclock_ns_elapsed(uint64_t t1, uint64_t t2);
struct timespec;
void normalize_timespec(struct timespec *ts);
/* record current CPU time in start_time */
void start_cpu_timing(struct timespec *start_time);
/* add difference between start_time and the current CPU time to add_to */
void end_cpu_timing(const struct timespec *start_time, struct timespec *add_to);
#endif