X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bench%2Fbench.h;h=facee3d14c20817ce1a5e7faaa75fd790699f14c;hb=1608c9d4a753e66c7e46dc2a5be69079470ec75b;hp=5c1769e04179f654a458a6ad2854322a4498e151;hpb=6ee503261b46df7787a07a85d407c5b85f92f0aa;p=platform%2Fupstream%2Flibxkbcommon.git diff --git a/bench/bench.h b/bench/bench.h index 5c1769e..facee3d 100644 --- a/bench/bench.h +++ b/bench/bench.h @@ -27,24 +27,23 @@ struct bench_time { long seconds; - long milliseconds; + long microseconds; }; -struct bench_timer { +struct bench { struct bench_time start; struct bench_time stop; -#if defined(__MACH__) && __MACH__ == 1 - uint64_t scaling_factor; -#endif }; -void bench_timer_reset(struct bench_timer *self); +void +bench_start(struct bench *bench); +void +bench_stop(struct bench *bench); -void bench_timer_start(struct bench_timer *self); -void bench_timer_stop(struct bench_timer *self); - -void bench_timer_get_elapsed_time(struct bench_timer *self, struct bench_time *result); -/* It's caller's responsibility to release the returned string using free(). */ -char *bench_timer_get_elapsed_time_str(struct bench_timer *self); +void +bench_elapsed(const struct bench *bench, struct bench_time *result); +/* The caller is responsibile to free() the returned string. */ +char * +bench_elapsed_str(const struct bench *bench); #endif /* LIBXKBCOMMON_BENCH_H */