Explorar o código

Changed time measure to process_time

Kristian Schultz %!s(int64=4) %!d(string=hai) anos
pai
achega
824f33fd81
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      library/timing.py

+ 2 - 4
library/timing.py

@@ -1,5 +1,3 @@
-
-
 import time
 
 
@@ -11,11 +9,11 @@ class timing:
         self.runCount = 0
 
     def start(self):
-        self.startTime = time.time()
+        self.startTime = time.process_time()
 
     def stop(self):
         if self.startTime is not None:
-            self.duration += time.time() - self.startTime
+            self.duration += time.process_time() - self.startTime
             self.runCount += 1
         self.startTime = None