summarylogtreecommitdiffstats
path: root/0001-replaced-time.clock-with-time.process_time-time-cloc.patch
blob: bd203159ebd85774245937c0c315f8f6937f74db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 6d41ad025331afce9e495d7be3205730ddfa8f07 Mon Sep 17 00:00:00 2001
From: Fabian Topfstedt <topfstedt@schneevonmorgen.com>
Date: Mon, 18 Nov 2019 22:19:35 +0100
Subject: [PATCH] replaced time.clock with time.process_time (time clock was
 flagged as deprecated in Python 3.3 and got removed in Python 3.8)

---
 lib/Crypto/Random/_UserFriendlyRNG.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
index 957e006..f389cfc 100644
--- a/lib/Crypto/Random/_UserFriendlyRNG.py
+++ b/lib/Crypto/Random/_UserFriendlyRNG.py
@@ -73,8 +73,8 @@ class _EntropyCollector(object):
         t = time.time()
         self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
 
-        # Add the fractional part of time.clock()
-        t = time.clock()
+        # Add the fractional part of time.process_time()
+        t = time.process_time()
         self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
 
 
-- 
2.27.0