Drop use of the deprecated time.clock which was removed in Python 3.8. Adapted from upstream pull request: https://github.com/dlitz/pycrypto/pull/296 diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py --- a/lib/Crypto/Random/_UserFriendlyRNG.py +++ b/lib/Crypto/Random/_UserFriendlyRNG.py @@ -73,8 +73,11 @@ 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() + try: + t = time.process_time() + except AttributeError: + t = time.clock() self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t))))) ipts Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/nix/libutil/util.cc
AgeCommit message (Expand)Author
2022-12-18daemon: Make "opening file" error messages distinguishable....Ludovic Courtès
2021-11-19daemon: Micro-optimize 'deletePath'....Ludovic Courtès
2020-12-08daemon: 'Agent' constructor takes a list of environment variables....Ludovic Courtès
2020-09-14daemon: Move 'Agent' to libutil....Ludovic Courtès
2020-03-26daemon: Avoid kill -1 bug on the Hurd....Manolis Ragkousis
2020-01-12daemon: Account for deleted store files when deduplication is on....Ludovic Courtès