diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-09-17 03:18:51 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-09-17 03:18:51 +0000 |
commit | 66084b816dd25a41f774240328a31d57efd276e4 (patch) | |
tree | acd22d0e3eb5f5608184fc18479e8890906cbe7f /src/sandglass.h | |
parent | f46ea7eb1b6f55036f10b6ae919c1785cb72c836 (diff) | |
download | libsandglass-66084b816dd25a41f774240328a31d57efd276e4.tar.xz |
Begin libsandglass implementation.
Diffstat (limited to 'src/sandglass.h')
-rw-r--r-- | src/sandglass.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/sandglass.h b/src/sandglass.h index a9e99e5..3cd14ba 100644 --- a/src/sandglass.h +++ b/src/sandglass.h @@ -93,7 +93,7 @@ struct sandglass_t long grains; /* grains/resolution should give elapsed time in seconds */ - long resolution; + double resolution; /* * Internal fields @@ -140,20 +140,15 @@ int sandglass_elapse(sandglass_t *sandglass); do { \ routine; \ sandglass_begin(sandglass); \ - for ((sandglass)->i = 0; (sandglass)->i < (sandglass)->loops; ++i) { \ + for ((sandglass)->i = 0; \ + (sandglass)->i < (sandglass)->loops; \ + ++(sandglass)->i) { \ SANDGLASS_NO_UNROLL(); \ routine; \ } \ sandglass_elapse(sandglass); \ } while (0) -/* - * Low-level API - */ - -/* Read the time stamp counter */ -long sandglass_get_tsc(); - #ifdef __cplusplus } #endif |