diff options
| author | jsing <> | 2014-05-05 16:06:55 +0000 |
|---|---|---|
| committer | jsing <> | 2014-05-05 16:06:55 +0000 |
| commit | 73c68c6d96f3cada94a85c4dc153394f7eab6722 (patch) | |
| tree | 649644ee1d9e19c62598381f629083d82e23c599 | |
| parent | f92856ff9035b53146e95a55e34d7b061dbe2383 (diff) | |
| download | openbsd-73c68c6d96f3cada94a85c4dc153394f7eab6722.tar.gz openbsd-73c68c6d96f3cada94a85c4dc153394f7eab6722.tar.bz2 openbsd-73c68c6d96f3cada94a85c4dc153394f7eab6722.zip | |
OpenBSD has_SC_CLK_TCK.
ok miod@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/src/apps/apps.c | 27 |
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 | ||
| 2460 | double | 2459 | double |
| @@ -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 | |||
| 2485 | double | ||
| 2486 | app_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 | ||
| 2508 | int | 2481 | int |
| 2509 | app_isdir(const char *name) | 2482 | app_isdir(const char *name) |
