From 35a1d0d051546f0bbaae9338aa3fed4d04a9a92e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 23 Oct 2009 18:14:55 +0000 Subject: New sandglass_bench_* macros, remove SANDGLASS_REALTICKS. sandglass_bench_fine() replaces SANDGLASS_REALTICKS; use SANDGLASS_CPUTIME instead. Also, sandglass_bench_noprecache() for when the expression to be timed has side-effects and should be executed only once. --- tests/monotonic-realticks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/monotonic-realticks.c') diff --git a/tests/monotonic-realticks.c b/tests/monotonic-realticks.c index 9b5daff..51404f5 100644 --- a/tests/monotonic-realticks.c +++ b/tests/monotonic-realticks.c @@ -30,14 +30,14 @@ int main() { sandglass_t sandglass; - sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_REALTICKS }; + sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_CPUTIME }; if (sandglass_create(&sandglass, &attr, &attr) != 0) { perror("sandglass_create()"); return EXIT_FAILURE; } - sandglass_bench(&sandglass, sandglass_get_tsc()); + sandglass_bench_fine(&sandglass, sandglass_get_tsc()); printf("%ld\n", sandglass.grains); -- cgit v1.2.3