From ab843ae81eb445d94ed6821e45df8a782d2886e6 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 20 Sep 2009 01:09:24 +0000 Subject: Don't change the `ts' parameter in sandglass_spin. --- tests/introspective-system.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/introspective-system.c') diff --git a/tests/introspective-system.c b/tests/introspective-system.c index 21ffa4c..beb799f 100644 --- a/tests/introspective-system.c +++ b/tests/introspective-system.c @@ -30,18 +30,14 @@ main() { sandglass_t sandglass; sandglass_attributes_t attr = { SANDGLASS_INTROSPECTIVE, SANDGLASS_SYSTEM }; - 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); -- cgit v1.2.3