File: python3.8

package info (click to toggle)
pysolfc 2.6.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 31,144 kB
  • sloc: python: 73,008; tcl: 4,529; sh: 339; makefile: 83; perl: 48
file content (19 lines) | stat: -rw-r--r-- 537 bytes parent folder | download
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