summaryrefslogtreecommitdiffstats
path: root/apps/apps.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-11-06 11:58:22 +0000
committerAndy Polyakov <appro@openssl.org>2005-11-06 11:58:22 +0000
commitf5301388766a1e30a377cb131cfa5fba782bda0b (patch)
tree7c1dcd98946ec1b81069cd414c4378df4b5632aa /apps/apps.c
parent0a39d8f2074aa96b48a76e01bd246f6beb778439 (diff)
Fix newly introduced typos and warnings in ./apps.
Diffstat (limited to 'apps/apps.c')
-rw-r--r--apps/apps.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 60bd7ef343..ee5edaa7b8 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -2375,6 +2375,7 @@ double app_tminterval(int stop,int usertime)
FILETIME now;
double ret=0;
static ULARGE_INTEGER tmstart;
+ static int warning=1;
#ifdef _WIN32_WINNT
static HANDLE proc=NULL;
@@ -2394,6 +2395,12 @@ double app_tminterval(int stop,int usertime)
else
#endif
{
+ if (usertime && warning)
+ {
+ BIO_printf(bio_err,"To get meaningful results, run "
+ "this program on idle system.\n"
+ warning=1;
+ }
SYSTEMTIME systime;
GetSystemTime(&systime);
SystemTimeToFileTime(&systime,&now);
@@ -2428,7 +2435,7 @@ double app_tminterval(int stop,int usertime)
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);
return (ret);
@@ -2448,7 +2455,7 @@ double app_tminterval(int stop,int usertime)
if (usertime) getrusage(RUSAGE_SELF,&rus), now = rus.ru_time;
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)
- (tmstart.tv_sec+tmstart.tv_usec*1e-6) );