From 82ce59838e9096b9f9f1ac3de5ec8b938e13da92 Mon Sep 17 00:00:00 2001 From: kinichiro Date: Tue, 26 Dec 2017 22:49:01 +0900 Subject: [PATCH] Add app_timer_user for Windows build --- apps/openssl/apps_win.c | 12 +++++------- 1 file 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 @@ #include "apps.h" double -app_tminterval(int stop, int usertime) +app_timer_user(int stop) { static unsigned __int64 tmstart; union { @@ -22,13 +22,11 @@ app_tminterval(int stop, int usertime) } ct, et, kt, ut; GetProcessTimes(GetCurrentProcess(), &ct.ft, &et.ft, &kt.ft, &ut.ft); - - if (stop == TM_START) { - tmstart = ut.u64 + kt.u64; - } else { + if (stop) return (ut.u64 + kt.u64 - tmstart) / (double) 10000000; - } - return 0; + + tmstart = ut.u64 + kt.u64; + return 0.0; } int