Added
Link Here
|
1 |
Fix runtime errors with Python 3.8+ because the function time.clock() has been |
2 |
removed in Python 3.8, after having been deprecated since Python 3.3. |
3 |
|
4 |
Obtained from: |
5 |
https://github.com/shlomif/PySolFC/commit/0961401105850a18ff129e2c25cfffae45a81752 |
6 |
|
7 |
--- pysollib/mfxutil.py.orig 2021-06-09 18:23:28 UTC |
8 |
+++ pysollib/mfxutil.py |
9 |
@@ -143,7 +143,11 @@ def getprefdir(package): |
10 |
|
11 |
|
12 |
# high resolution clock() and sleep() |
13 |
-uclock = time.clock |
14 |
+try: |
15 |
+ uclock = time.perf_counter |
16 |
+except Exception: |
17 |
+ uclock = time.clock |
18 |
+ |
19 |
usleep = time.sleep |
20 |
if os.name == "posix": |
21 |
uclock = time.time |