1 Drop use of the deprecated time.clock which was removed in Python 3.8.
3 Adapted from upstream pull request:
5 https://github.com/dlitz/pycrypto/pull/296
7 diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
8 --- a/lib/Crypto/Random/_UserFriendlyRNG.py
9 +++ b/lib/Crypto/Random/_UserFriendlyRNG.py
10 @@ -73,8 +73,11 @@ class _EntropyCollector(object):
12 self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
14 - # Add the fractional part of time.clock()
16 + # Add the fractional part of time.process_time()
18 + t = time.process_time()
19 + except AttributeError:
21 self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))