فهرست منبع

Changed time measure to process_time

Kristian Schultz 4 سال پیش
والد
کامیت
824f33fd81
1فایلهای تغییر یافته به همراه2 افزوده شده و 4 حذف شده
  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