From 8069bf585453c96d1d14c1c0f53f3592bf057453 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Fri, 22 May 2020 10:14:04 +0200 Subject: [PATCH] Drop special case of time interval calculation for VMS The existing special case code is broken and it is not needed anymore as times() and _SC_CLK_TCK should be supported on the supported VMS versions. Reviewed-by: Richard Levitte Reviewed-by: Kurt Roeckx Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/11905) --- apps/lib/apps.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 497081c153..dbc9be344d 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -2230,40 +2230,6 @@ double app_tminterval(int stop, int usertime) return ret; } -#elif defined(OPENSSL_SYSTEM_VMS) -# include -# include - -double app_tminterval(int stop, int usertime) -{ - static clock_t tmstart; - double ret = 0; - clock_t now; -# ifdef __TMS - struct tms rus; - - now = times(&rus); - if (usertime) - now = rus.tms_utime; -# else - if (usertime) - now = clock(); /* sum of user and kernel times */ - else { - struct timeval tv; - gettimeofday(&tv, NULL); - now = (clock_t)((unsigned long long)tv.tv_sec * CLK_TCK + - (unsigned long long)tv.tv_usec * (1000000 / CLK_TCK) - ); - } -# endif - if (stop == TM_START) - tmstart = now; - else - ret = (now - tmstart) / (double)(CLK_TCK); - - return ret; -} - #elif defined(_SC_CLK_TCK) /* by means of unistd.h */ # include -- 2.39.2