1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: pysolfc uses time.clock, removed in python3.8.
Origin: https://github.com/shlomif/PySolFC/commit/e0c0e3cdbe91f049c26c44547d728a7357d2862c#diff-86b451de571f92396b146cd6a69836e9
Forwarded: https://github.com/shlomif/PySolFC/issues/145
--- a/pysollib/mfxutil.py
+++ b/pysollib/mfxutil.py
@@ -143,7 +143,11 @@
# high resolution clock() and sleep()
-uclock = time.clock
+try:
+ uclock = time.perf_counter
+except Exception:
+ uclock = time.clock
+
usleep = time.sleep
if os.name == "posix":
uclock = time.time
|