diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-03-03 23:35:31 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-03-03 23:35:31 -0500 |
commit | 79d0dd0f54d459467dfe88fba68d4b64a461c187 (patch) | |
tree | 83c98e136ef5f23c47e5f205fbdcaa8b6d3baf62 /tests/monotonic-system.c | |
parent | c497ac253504a73fbbb35788ddd8faec1163248a (diff) | |
download | libsandglass-79d0dd0f54d459467dfe88fba68d4b64a461c187.tar.xz |
Make the API not suck.
Seriously, not sure what I was thinking with the attributes type.
Diffstat (limited to 'tests/monotonic-system.c')
-rw-r--r-- | tests/monotonic-system.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/monotonic-system.c b/tests/monotonic-system.c index 0774908..d8ffba9 100644 --- a/tests/monotonic-system.c +++ b/tests/monotonic-system.c @@ -29,17 +29,16 @@ int main() { sandglass_t sandglass; - sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_SYSTEM }; struct timespec tosleep = { .tv_sec = 0, .tv_nsec = 111111111L }; - if (sandglass_create(&sandglass, &attr, &attr) != 0) { + if (sandglass_init_monotonic(&sandglass, SANDGLASS_SYSTEM) != 0) { perror("sandglass_create()"); return EXIT_FAILURE; } sandglass_bench(&sandglass, sandglass_spin(&tosleep)); - printf("%.15g\n", sandglass.grains/sandglass.resolution); + printf("%.15g\n", sandglass.grains/sandglass.freq); return EXIT_SUCCESS; } |