summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2014-05-05 16:06:55 +0000
committerjsing <>2014-05-05 16:06:55 +0000
commit8b9f526bb8fbc69c9ed84e60c9f7fb4fc4c1dce2 (patch)
tree649644ee1d9e19c62598381f629083d82e23c599 /src
parent5b4326f23352be2e7084f2020795d8aa042c746f (diff)
downloadopenbsd-8b9f526bb8fbc69c9ed84e60c9f7fb4fc4c1dce2.tar.gz
openbsd-8b9f526bb8fbc69c9ed84e60c9f7fb4fc4c1dce2.tar.bz2
openbsd-8b9f526bb8fbc69c9ed84e60c9f7fb4fc4c1dce2.zip
OpenBSD has_SC_CLK_TCK.
ok miod@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/src/apps/apps.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c
index 5e6b94f84b..b2efe6db39 100644
--- a/src/lib/libssl/src/apps/apps.c
+++ b/src/lib/libssl/src/apps/apps.c
@@ -2454,7 +2454,6 @@ next_protos_parse(unsigned short *outlen, const char *in)
2454 */ 2454 */
2455 2455
2456/* app_tminterval section */ 2456/* app_tminterval section */
2457#if defined(_SC_CLK_TCK) /* by means of unistd.h */
2458#include <sys/times.h> 2457#include <sys/times.h>
2459 2458
2460double 2459double
@@ -2478,32 +2477,6 @@ app_tminterval(int stop, int usertime)
2478 return (ret); 2477 return (ret);
2479} 2478}
2480 2479
2481#else
2482#include <sys/time.h>
2483#include <sys/resource.h>
2484
2485double
2486app_tminterval(int stop, int usertime)
2487{
2488 double ret = 0;
2489 struct rusage rus;
2490 struct timeval now;
2491 static struct timeval tmstart;
2492
2493 if (usertime)
2494 getrusage(RUSAGE_SELF, &rus), now = rus.ru_utime;
2495 else
2496 gettimeofday(&now, NULL);
2497
2498 if (stop == TM_START)
2499 tmstart = now;
2500 else
2501 ret = ((now.tv_sec + now.tv_usec * 1e-6) -
2502 (tmstart.tv_sec + tmstart.tv_usec * 1e-6));
2503
2504 return ret;
2505}
2506#endif
2507 2480
2508int 2481int
2509app_isdir(const char *name) 2482app_isdir(const char *name)