blob: 282fdd3e2b9d36ac901b7e999445e8b59b0e7872 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 1d90727ff2368012d6e2f91b1a3198f626495b7f Mon Sep 17 00:00:00 2001
2From: Ming Liu <liu.ming50@gmail.com>
3Date: Sat, 25 Jan 2020 14:36:16 +0100
4Subject: [PATCH] Replace time.clock() with time.process_time()
5
6The use of time.clock() is deprecated in python 3.8, change to use
7time.process_time().
8
9Reference:
10https://docs.python.org/3.3/library/time.html#time.clock
11
12Upstream-Status: Pending
13
14Signed-off-by: Ming Liu <liu.ming50@gmail.com>
15---
16 lib/Crypto/Random/_UserFriendlyRNG.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
20index 957e006..d2a0259 100644
21--- a/lib/Crypto/Random/_UserFriendlyRNG.py
22+++ b/lib/Crypto/Random/_UserFriendlyRNG.py
23@@ -74,7 +74,7 @@ class _EntropyCollector(object):
24 self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
25
26 # Add the fractional part of time.clock()
27- t = time.clock()
28+ t = time.process_time()
29 self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
30
31
32--
332.7.4
34