summaryrefslogtreecommitdiffstats
path: root/tests/monotonic-realticks.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-09-21 03:48:38 +0000
committerTavian Barnes <tavianator@gmail.com>2009-09-21 03:48:38 +0000
commit18068cf26d34d28db8c70e26930cd842c3aecfb4 (patch)
tree27f303426e62389d189a24e8137d3b3858ceadc2 /tests/monotonic-realticks.c
parent9bfbf7832dd379a4a006d236fbeda27be7e13928 (diff)
downloadlibsandglass-18068cf26d34d28db8c70e26930cd842c3aecfb4.tar.xz
Show more accuracy in output of tests.
Diffstat (limited to 'tests/monotonic-realticks.c')
-rw-r--r--tests/monotonic-realticks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/monotonic-realticks.c b/tests/monotonic-realticks.c
index eb9e9f6..9b5daff 100644
--- a/tests/monotonic-realticks.c
+++ b/tests/monotonic-realticks.c
@@ -24,20 +24,20 @@
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
+#include <math.h>
int
main()
{
sandglass_t sandglass;
sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_REALTICKS };
- unsigned int i = 0;
if (sandglass_create(&sandglass, &attr, &attr) != 0) {
perror("sandglass_create()");
return EXIT_FAILURE;
}
- sandglass_bench(&sandglass, ++i);
+ sandglass_bench(&sandglass, sandglass_get_tsc());
printf("%ld\n", sandglass.grains);