diff options
author | jca <> | 2017-12-05 15:02:06 +0000 |
---|---|---|
committer | jca <> | 2017-12-05 15:02:06 +0000 |
commit | bfd05667a48d9cd78ffd15858ceeda66e215fb5a (patch) | |
tree | a2b7a9f62feac0c78c0fc3f4d2e4d213ea4ee4b4 /src/usr.bin/openssl/apps_posix.c | |
parent | 600f75bb29d99689e97396445d8fe7607c8d33e5 (diff) | |
download | openbsd-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.c | 14 |
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 | ||
126 | static double | 126 | double |
127 | real_interval(int stop) | 127 | app_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 | ||
141 | static double | 141 | double |
142 | user_interval(int stop) | 142 | app_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 | ||
157 | double | ||
158 | app_tminterval(int stop, int usertime) | ||
159 | { | ||
160 | return (usertime) ? user_interval(stop) : real_interval(stop); | ||
161 | } | ||
162 | |||
163 | int | 157 | int |
164 | setup_ui(void) | 158 | setup_ui(void) |
165 | { | 159 | { |