diff options
author | Simon Josefsson <simon@josefsson.org> | 2012-11-06 15:49:29 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2012-11-06 15:49:29 +0100 |
commit | c9944365bbd4e957e7df8f05dd5cf386ce7824a1 (patch) | |
tree | 8930184b2a66a0fe3cd6cb14e59759695336ad33 /src | |
parent | 6ec5b1f5915f8c425ea5a436af01518fcb6eb04a (diff) | |
download | libtasn1-c9944365bbd4e957e7df8f05dd5cf386ce7824a1.tar.gz libtasn1-c9944365bbd4e957e7df8f05dd5cf386ce7824a1.tar.bz2 libtasn1-c9944365bbd4e957e7df8f05dd5cf386ce7824a1.zip |
Don't overload the 'time' global name.
Diffstat (limited to 'src')
-rw-r--r-- | src/benchmark.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/benchmark.c b/src/benchmark.c index f18ed1c..1ebf6b6 100644 --- a/src/benchmark.c +++ b/src/benchmark.c @@ -47,34 +47,34 @@ alarm_handler (int signo) #endif static void -value2human (unsigned long bytes, double time, double *data, double *speed, +value2human (unsigned long bytes, double secs, double *data, double *speed, char *metric) { if (bytes > 1000 && bytes < 1000 * 1000) { *data = ((double) bytes) / 1000; - *speed = *data / time; + *speed = *data / secs; strcpy (metric, "KB"); return; } else if (bytes >= 1000 * 1000 && bytes < 1000 * 1000 * 1000) { *data = ((double) bytes) / (1000 * 1000); - *speed = *data / time; + *speed = *data / secs; strcpy (metric, "MB"); return; } else if (bytes >= 1000 * 1000 * 1000) { *data = ((double) bytes) / (1000 * 1000 * 1000); - *speed = *data / time; + *speed = *data / secs; strcpy (metric, "GB"); return; } else { *data = (double) bytes; - *speed = *data / time; + *speed = *data / secs; strcpy (metric, "bytes"); return; } |