diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-07-10 03:16:11 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:27 -0400 |
commit | 037c716b6514cc717b7208457fb72085e4c278ab (patch) | |
tree | 59ccc8ea645418074c114fa47b4f9bdb9e17b861 /proto/tmain.c | |
parent | c7ab830c2205c5a51c88d9d9eddff2dc3bacc22d (diff) | |
download | roux-037c716b6514cc717b7208457fb72085e4c278ab.tar.gz |
move ml prototype in a subdir
Diffstat (limited to 'proto/tmain.c')
-rw-r--r-- | proto/tmain.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/proto/tmain.c b/proto/tmain.c new file mode 100644 index 0000000..79e1c24 --- /dev/null +++ b/proto/tmain.c @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <time.h> + +enum { NRounds = 150 }; + +extern long f(void); + +int main() +{ + clock_t t0, tmin; + long i, l; + + tmin = 10 * CLOCKS_PER_SEC; + for (i=0; i<NRounds; i++) { + t0 = clock(); + l = f(); + t0 = clock() - t0; + if (t0 < tmin) + tmin = t0; + } + printf("f() = %ld\n", l); + printf(" %.4f secs\n", (double)t0/CLOCKS_PER_SEC); + return 0; +} |