浏览代码

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