Fix newly introduced typos and warnings in ./apps.
This commit is contained in:
parent
0a39d8f207
commit
f530138876
11
apps/apps.c
11
apps/apps.c
@ -2375,6 +2375,7 @@ double app_tminterval(int stop,int usertime)
|
|||||||
FILETIME now;
|
FILETIME now;
|
||||||
double ret=0;
|
double ret=0;
|
||||||
static ULARGE_INTEGER tmstart;
|
static ULARGE_INTEGER tmstart;
|
||||||
|
static int warning=1;
|
||||||
#ifdef _WIN32_WINNT
|
#ifdef _WIN32_WINNT
|
||||||
static HANDLE proc=NULL;
|
static HANDLE proc=NULL;
|
||||||
|
|
||||||
@ -2394,6 +2395,12 @@ double app_tminterval(int stop,int usertime)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
if (usertime && warning)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"To get meaningful results, run "
|
||||||
|
"this program on idle system.\n"
|
||||||
|
warning=1;
|
||||||
|
}
|
||||||
SYSTEMTIME systime;
|
SYSTEMTIME systime;
|
||||||
GetSystemTime(&systime);
|
GetSystemTime(&systime);
|
||||||
SystemTimeToFileTime(&systime,&now);
|
SystemTimeToFileTime(&systime,&now);
|
||||||
@ -2428,7 +2435,7 @@ double app_tminterval(int stop,int usertime)
|
|||||||
|
|
||||||
if (usertime) now = rus.tms_utime;
|
if (usertime) now = rus.tms_utime;
|
||||||
|
|
||||||
if (stop==TMSTART) tmstart = now;
|
if (stop==TM_START) tmstart = now;
|
||||||
else ret = (now - tmstart)/(double)sysconf(_SC_CLK_TCK);
|
else ret = (now - tmstart)/(double)sysconf(_SC_CLK_TCK);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
@ -2448,7 +2455,7 @@ double app_tminterval(int stop,int usertime)
|
|||||||
if (usertime) getrusage(RUSAGE_SELF,&rus), now = rus.ru_time;
|
if (usertime) getrusage(RUSAGE_SELF,&rus), now = rus.ru_time;
|
||||||
else gettimeofday(&now,NULL);
|
else gettimeofday(&now,NULL);
|
||||||
|
|
||||||
if (stop==TMSTART) tmstart = now;
|
if (stop==TM_START) tmstart = now;
|
||||||
else ret = ( (now.tv_sec+now.tv_usec*1e-6)
|
else ret = ( (now.tv_sec+now.tv_usec*1e-6)
|
||||||
- (tmstart.tv_sec+tmstart.tv_usec*1e-6) );
|
- (tmstart.tv_sec+tmstart.tv_usec*1e-6) );
|
||||||
|
|
||||||
|
@ -183,7 +183,6 @@
|
|||||||
#define BUFSIZE ((long)1024*8+1)
|
#define BUFSIZE ((long)1024*8+1)
|
||||||
int run=0;
|
int run=0;
|
||||||
|
|
||||||
static char ftime_used = 0, times_used = 0, gettimeofday_used = 0, getrusage_used = 0;
|
|
||||||
static int mr=0;
|
static int mr=0;
|
||||||
static int usertime=1;
|
static int usertime=1;
|
||||||
|
|
||||||
@ -1050,11 +1049,6 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
if (usertime == 0 && !mr)
|
if (usertime == 0 && !mr)
|
||||||
BIO_printf(bio_err,"You have chosen to measure elapsed time instead of user CPU time.\n");
|
BIO_printf(bio_err,"You have chosen to measure elapsed time instead of user CPU time.\n");
|
||||||
if (usertime <= 0 && !mr)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"To get the most accurate results, try to run this\n");
|
|
||||||
BIO_printf(bio_err,"program when this computer is idle.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_RSA
|
#ifndef OPENSSL_NO_RSA
|
||||||
for (i=0; i<RSA_NUM; i++)
|
for (i=0; i<RSA_NUM; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user