File: clock.patch

package info (click to toggle)
khronos-api 4.6%2Bgit20180514-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 3,508 kB
  • sloc: xml: 52,871; python: 1,715; makefile: 50; ansic: 23; php: 15; sh: 3
file content (18 lines) | stat: -rw-r--r-- 507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
description: time.clock is removed in python 3.8
author: Michael Gilbert <mgilbert@debian.org>

--- a/xml/genheaders.py
+++ b/xml/genheaders.py
@@ -75,10 +75,10 @@ if __name__ == '__main__':
 startTime = None
 def startTimer():
     global startTime
-    startTime = time.clock()
+    startTime = time.perf_counter()
 def endTimer(msg):
     global startTime
-    endTime = time.clock()
+    endTime = time.perf_counter()
     if (timeit):
         write(msg, endTime - startTime)
         startTime = None