summaryrefslogtreecommitdiffstats
path: root/tests/monotonic-realticks.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/monotonic-realticks.c')
-rw-r--r--tests/monotonic-realticks.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/monotonic-realticks.c b/tests/monotonic-realticks.c
index 5cadd1d..c548f18 100644
--- a/tests/monotonic-realticks.c
+++ b/tests/monotonic-realticks.c
@@ -30,18 +30,14 @@ main()
{
sandglass_t sandglass;
sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_REALTICKS };
- struct timespec tosleep;
+ struct timespec tosleep = { .tv_sec = 0, .tv_nsec = 100000000L };
if (sandglass_create(&sandglass, &attr, &attr) != 0) {
perror("sandglass_create()");
return EXIT_FAILURE;
}
- sandglass_bench(&sandglass, {
- tosleep.tv_sec = 0;
- tosleep.tv_nsec = 100000000L;
- sandglass_spin(&tosleep);
- });
+ sandglass_bench(&sandglass, sandglass_spin(&tosleep));
printf("%g\n", sandglass.grains/sandglass.resolution);