summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/apps_posix.c
diff options
context:
space:
mode:
authorjca <>2017-12-05 15:02:06 +0000
committerjca <>2017-12-05 15:02:06 +0000
commitbfd05667a48d9cd78ffd15858ceeda66e215fb5a (patch)
treea2b7a9f62feac0c78c0fc3f4d2e4d213ea4ee4b4 /src/usr.bin/openssl/apps_posix.c
parent600f75bb29d99689e97396445d8fe7607c8d33e5 (diff)
downloadopenbsd-bfd05667a48d9cd78ffd15858ceeda66e215fb5a.tar.gz
openbsd-bfd05667a48d9cd78ffd15858ceeda66e215fb5a.tar.bz2
openbsd-bfd05667a48d9cd78ffd15858ceeda66e215fb5a.zip
Seperate real and user timer interfaces
Use more descriptive names, and make it clearer that real and user timers work on different static storage. The end goal is to be able to reuse those timer functions, instead of inlining other timer implementations subject to clock jumps. Discussed with Scott Cheloha
Diffstat (limited to 'src/usr.bin/openssl/apps_posix.c')
-rw-r--r--src/usr.bin/openssl/apps_posix.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/usr.bin/openssl/apps_posix.c b/src/usr.bin/openssl/apps_posix.c
index 94c6d35f71..502919c0a2 100644
--- a/src/usr.bin/openssl/apps_posix.c
+++ b/src/usr.bin/openssl/apps_posix.c
@@ -123,8 +123,8 @@
123 123
124#include "apps.h" 124#include "apps.h"
125 125
126static double 126double
127real_interval(int stop) 127app_timer_real(int stop)
128{ 128{
129 static struct timespec start; 129 static struct timespec start;
130 struct timespec elapsed, now; 130 struct timespec elapsed, now;
@@ -138,8 +138,8 @@ real_interval(int stop)
138 return 0.0; 138 return 0.0;
139} 139}
140 140
141static double 141double
142user_interval(int stop) 142app_timer_user(int stop)
143{ 143{
144 static struct timeval start; 144 static struct timeval start;
145 struct timeval elapsed; 145 struct timeval elapsed;
@@ -154,12 +154,6 @@ user_interval(int stop)
154 return 0.0; 154 return 0.0;
155} 155}
156 156
157double
158app_tminterval(int stop, int usertime)
159{
160 return (usertime) ? user_interval(stop) : real_interval(stop);
161}
162
163int 157int
164setup_ui(void) 158setup_ui(void)
165{ 159{