aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2017-12-26 22:49:01 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2017-12-26 22:49:01 +0900
commit82ce59838e9096b9f9f1ac3de5ec8b938e13da92 (patch)
tree58d97b227b78ab24740e517e7ad72fcd9ba5da55 /apps
parent7b6953e9a931dab2e6f85d204de1c68c81074553 (diff)
downloadportable-82ce59838e9096b9f9f1ac3de5ec8b938e13da92.tar.gz
portable-82ce59838e9096b9f9f1ac3de5ec8b938e13da92.tar.bz2
portable-82ce59838e9096b9f9f1ac3de5ec8b938e13da92.zip
Add app_timer_user for Windows build
Diffstat (limited to 'apps')
-rw-r--r--apps/openssl/apps_win.c12
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
15double 15double
16app_tminterval(int stop, int usertime) 16app_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
34int 32int