On Thu, Sep 27, 2001 at 02:15:57PM +0200, Richard Levitte - VMS Whacker wrote:

> 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.  [...]

Do 'ssltest' timings make sense (they are automatically displayed
while running 'make test')?  In 'ssltest' and 'ectest', I always
use clock() and CLOCKS_PER_SEC, which are part of the C standard.
This is sufficient as long as you just want user time.

If you want elapsed real time ('openssl speed -elapsed'), you need
times(), which measures in clock ticks and not in CLOCKS_PER_SEC.
It seems the preferred way to get the correct number of clock ticks
per second is to use sysconf(_SC_CLK_TCK) and not the CLK_TCK macro.
So maybe changing the HZ definition in apps/speed.c as follows
might help:

#include OPENSSL_UNISTD
#ifndef HZ
#  ifdef _SC_CLK_TCK
#    define HZ (sysconf(_SC_CLK_TCK))
#  else
   /* ... */
#endif



-- 
Bodo M�ller <[EMAIL PROTECTED]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to