Revive app_tminterval for vxworks.
This commit is contained in:
parent
a950f28762
commit
d88fcf73f1
37
apps/apps.c
37
apps/apps.c
@ -2401,7 +2401,7 @@ double app_tminterval(int stop,int usertime)
|
|||||||
{
|
{
|
||||||
BIO_printf(bio_err,"To get meaningful results, run "
|
BIO_printf(bio_err,"To get meaningful results, run "
|
||||||
"this program on idle system.\n");
|
"this program on idle system.\n");
|
||||||
warning=1;
|
warning=0;
|
||||||
}
|
}
|
||||||
GetSystemTime(&systime);
|
GetSystemTime(&systime);
|
||||||
SystemTimeToFileTime(&systime,&now);
|
SystemTimeToFileTime(&systime,&now);
|
||||||
@ -2424,6 +2424,41 @@ double app_tminterval(int stop,int usertime)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif defined(OPENSSL_SYSTEM_VXWORKS)
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
double app_tminterval(int stop,int usertime)
|
||||||
|
{
|
||||||
|
double ret=0;
|
||||||
|
#ifdef CLOCK_REALTIME
|
||||||
|
static struct timespec tmstart;
|
||||||
|
struct timespec now;
|
||||||
|
#else
|
||||||
|
static unsigned long tmstart;
|
||||||
|
unsigned long now;
|
||||||
|
#endif
|
||||||
|
static int warning=1;
|
||||||
|
|
||||||
|
if (usertime && warning)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"To get meaningful results, run "
|
||||||
|
"this program on idle system.\n");
|
||||||
|
warning=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CLOCK_REALTIME
|
||||||
|
clock_gettime(CLOCK_REALTIME,&now);
|
||||||
|
if (stop==TM_START) tmstart = now;
|
||||||
|
else ret = ( (now.tv_sec+now.tv_nsec*1e-9)
|
||||||
|
- (tmstart.tv_sec+tmstart.tv_nsec*1e-9) );
|
||||||
|
#else
|
||||||
|
now = tickGet();
|
||||||
|
if (stop==TM_START) tmstart = now;
|
||||||
|
else ret = (now - tmstart)/(double)sysClkRateGet();
|
||||||
|
#endif
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
#elif defined(OPENSSL_SYSTEM_VMS)
|
#elif defined(OPENSSL_SYSTEM_VMS)
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <times.h>
|
#include <times.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user