I was quite surprised when running openssl speed today, and got 0.00s as user time for everything. This is on a RH 6.2 box.
I found this *very* interesting little thing in /usr/include/linux/time.h: /* ISO/IEC 9899:1990 7.12.1: <time.h> The macro `CLOCKS_PER_SEC' is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: <time.h> The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ # define CLOCKS_PER_SEC 1000000 # ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ # define CLK_TCK 100 # endif And in /usr/include/time.h, unless CLK_TCK is already defined, it will be defined to the value of CLOCKS_PER_SEC. Now, it seems like results might differ depending on if you compile a program using this with -ansi or not. And actually, if I define HZ to 100.0 in all cases in apps/speed.c, I get a result that's at least different from 0.00s (0.21s for 1024 bit private RSA's and 0.59s for 1024 bit public RSA's). I'm quite dubious about this whole tick business. Any comments? -- Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED] Redakteur@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 \ SWEDEN \ or +46-733-72 88 11 Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Software Engineer, GemPlus: http://www.gemplus.com/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]