Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion autobahn/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,10 @@ def generate_serial_number():
# first call to this function, as a floating point number, based on the
# Win32 function QueryPerformanceCounter(). The resolution is typically
# better than one microsecond
_rtime = time.clock
if sys.version_info >= (3, 8):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perf_counter was added in Python 3.3. Why we can't use it for all Python 3.3+ line?
time.clock produces a warning on <Python 3.8

_rtime = time.perf_counter
else:
_rtime = time.clock
_ = _rtime() # this starts wallclock
else:
# On Unix-like platforms, this used the first available from this list:
Expand Down