Skip to content

Commit f269bd1

Browse files
committed
Remove try/except block because per_counter is in all supported python versions
1 parent c4783af commit f269bd1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

vpython/rate_control.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import time
2-
try:
3-
_clock = time.perf_counter # time.clock is deprecated in Python 3.3, gone in 3.8
4-
except:
5-
_clock = time.clock
2+
3+
_clock = time.perf_counter
4+
5+
66
_tick = 1/60
77

88
#import platform

vpython/vpython.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
from math import sqrt, tan, pi
77

88
import time
9-
try:
10-
clock = time.perf_counter # time.clock is deprecated in Python 3.3, gone in 3.8
11-
except:
12-
clock = time.clock
9+
10+
# vpython provides clock in its namespace
11+
clock = time.perf_counter
12+
1313
import sys
1414
from . import __version__, __gs_version__
1515
from ._notebook_helpers import _isnotebook

0 commit comments

Comments
 (0)