Skip to content

Commit

Permalink
test.py: make compatible with python-3.8
Browse files Browse the repository at this point in the history
* time.clock() was removed from Python 3.8 in
  python/cpython#13270

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
  • Loading branch information
shr-project committed Mar 25, 2020
1 parent aa241bb commit 5607a4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python2.6
#!/usr/bin/env python3

import sys
from time import clock
from time import perf_counter

from p2t import *

Expand Down Expand Up @@ -50,7 +50,7 @@ def main(file_name, translate, zoom):
polyline.append(Point(p[0],p[1]))

# initialize clock
t0 = clock()
t0 = perf_counter()

##
## Step 1: Initialize
Expand Down Expand Up @@ -87,7 +87,7 @@ def main(file_name, translate, zoom):
##
triangles = cdt.triangulate()

print ("Elapsed time (ms) = " + str(clock()*1000.0))
print ("Elapsed time (ms) = " + str(perf_counter()*1000.0))

# The Main Event Loop
done = False
Expand Down

0 comments on commit 5607a4e

Please sign in to comment.