Determine HZ exactly as in apps/speed.c.
This commit is contained in:
parent
450cee5c3a
commit
a1d85309ee
@ -59,6 +59,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/tmdiff.h>
|
#include <openssl/tmdiff.h>
|
||||||
|
#if !defined(OPENSSL_SYS_MSDOS)
|
||||||
|
#include OPENSSL_UNISTD
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TIMEB
|
#ifdef TIMEB
|
||||||
#undef OPENSSL_SYS_WIN32
|
#undef OPENSSL_SYS_WIN32
|
||||||
@ -101,6 +104,10 @@
|
|||||||
|
|
||||||
/* The following if from times(3) man page. It may need to be changed */
|
/* The following if from times(3) man page. It may need to be changed */
|
||||||
#ifndef HZ
|
#ifndef HZ
|
||||||
|
# if defined(_SC_CLK_TCK) \
|
||||||
|
&& (!defined(OPENSSL_SYS_VMS) || __CTRL_VER >= 70000000)
|
||||||
|
# define HZ ((double)sysconf(_SC_CLK_TCK))
|
||||||
|
# else
|
||||||
# ifndef CLK_TCK
|
# ifndef CLK_TCK
|
||||||
# ifndef _BSD_CLK_TCK_ /* FreeBSD hack */
|
# ifndef _BSD_CLK_TCK_ /* FreeBSD hack */
|
||||||
# define HZ 100.0
|
# define HZ 100.0
|
||||||
@ -111,6 +118,7 @@
|
|||||||
# define HZ ((double)CLK_TCK)
|
# define HZ ((double)CLK_TCK)
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct ms_tm
|
typedef struct ms_tm
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user