summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/speed.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/speed.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/speed.c')
-rw-r--r--src/usr.bin/openssl/speed.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/speed.c b/src/usr.bin/openssl/speed.c
index 90cf6de011..4238b15f61 100644
--- a/src/usr.bin/openssl/speed.c
+++ b/src/usr.bin/openssl/speed.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: speed.c,v 1.20 2017/10/07 06:16:54 guenther Exp $ */ 1/* $OpenBSD: speed.c,v 1.21 2017/12/05 15:02:06 jca Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -202,7 +202,10 @@ sig_done(int sig)
202static double 202static double
203Time_F(int s) 203Time_F(int s)
204{ 204{
205 return app_tminterval(s, usertime); 205 if (usertime)
206 return app_timer_user(s);
207 else
208 return app_timer_real(s);
206} 209}
207 210
208 211