diff options
| author | Brent Cook <bcook@openbsd.org> | 2017-12-28 03:39:59 -0600 |
|---|---|---|
| committer | Brent Cook <bcook@openbsd.org> | 2017-12-28 03:39:59 -0600 |
| commit | 52c39d42ea083506575ab75929dfa1edddd94c08 (patch) | |
| tree | 9e385588462a22054cd033d16166da180f528ea8 | |
| parent | 9a7fb374052b0fc546db2331cbcd9c1419fdbdfd (diff) | |
| parent | 82ce59838e9096b9f9f1ac3de5ec8b938e13da92 (diff) | |
| download | portable-52c39d42ea083506575ab75929dfa1edddd94c08.tar.gz portable-52c39d42ea083506575ab75929dfa1edddd94c08.tar.bz2 portable-52c39d42ea083506575ab75929dfa1edddd94c08.zip | |
Land #373, add app_timer_user for Windows
| -rw-r--r-- | apps/openssl/apps_win.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/openssl/apps_win.c b/apps/openssl/apps_win.c index 37bfcc9..6d066c0 100644 --- a/apps/openssl/apps_win.c +++ b/apps/openssl/apps_win.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include "apps.h" | 13 | #include "apps.h" |
| 14 | 14 | ||
| 15 | double | 15 | double |
| 16 | app_tminterval(int stop, int usertime) | 16 | app_timer_user(int stop) |
| 17 | { | 17 | { |
| 18 | static unsigned __int64 tmstart; | 18 | static unsigned __int64 tmstart; |
| 19 | union { | 19 | union { |
| @@ -22,13 +22,11 @@ app_tminterval(int stop, int usertime) | |||
| 22 | } ct, et, kt, ut; | 22 | } ct, et, kt, ut; |
| 23 | 23 | ||
| 24 | GetProcessTimes(GetCurrentProcess(), &ct.ft, &et.ft, &kt.ft, &ut.ft); | 24 | GetProcessTimes(GetCurrentProcess(), &ct.ft, &et.ft, &kt.ft, &ut.ft); |
| 25 | 25 | if (stop) | |
| 26 | if (stop == TM_START) { | ||
| 27 | tmstart = ut.u64 + kt.u64; | ||
| 28 | } else { | ||
| 29 | return (ut.u64 + kt.u64 - tmstart) / (double) 10000000; | 26 | return (ut.u64 + kt.u64 - tmstart) / (double) 10000000; |
| 30 | } | 27 | |
| 31 | return 0; | 28 | tmstart = ut.u64 + kt.u64; |
| 29 | return 0.0; | ||
| 32 | } | 30 | } |
| 33 | 31 | ||
| 34 | int | 32 | int |
