From d8130c61443893e490d19da25ea5f32814c5367b Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sun, 5 Oct 2008 14:45:37 -0400 Subject: nicer output for cycle calibration --- bin/cycles.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/cycles.c b/bin/cycles.c index 4e5a078..a6b9308 100644 --- a/bin/cycles.c +++ b/bin/cycles.c @@ -8,7 +8,7 @@ int main(int argc, char** argv) { cycles_t t1, t2; int secs = 1; - + if (argc > 1) { secs = atoi(argv[1]); if (secs <= 0) @@ -19,7 +19,10 @@ int main(int argc, char** argv) sleep(secs); t2 = get_cycles(); t2 -= t1; - printf("%.2f/sec\n", t2 / (double) secs); + printf("%.2f/sec %.2f/msec %.2f/usec\n", + t2 / (double) secs, + t2 / (secs * 1000.0), + t2 / (secs * 1000000.0)); } return 0; } -- cgit v1.2.2