From 63268a83f61974423807229ae903f7740eb90d96 Mon Sep 17 00:00:00 2001 From: Metallicow Date: Fri, 21 Feb 2020 03:00:55 -0600 Subject: [PATCH] time.clock is removed in py3.8 use perf_counter time.clock is removed in py3.8 use perf_counter --- wx/lib/agw/aui/framemanager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wx/lib/agw/aui/framemanager.py b/wx/lib/agw/aui/framemanager.py index 87d04d54..3b3a5e72 100644 --- a/wx/lib/agw/aui/framemanager.py +++ b/wx/lib/agw/aui/framemanager.py @@ -98,10 +98,11 @@ __date__ = "31 March 2009" import wx # just for isinstance +from time import time try: - from time import time, process_time as clock -except ImportError: - from time import time, clock + from time import perf_counter +except ImportError: # clock is removed in py3.8 + from time import clock as perf_counter import warnings import six @@ -4755,7 +4756,7 @@ class AuiManager(wx.EvtHandler): # if the pane's name identifier is blank, create a random string if pinfo.name == "" or already_exists: pinfo.name = ("%s%08x%08x%08x") % (pinfo.window.GetName(), int(time()), - int(clock()), len(self._panes)) + int(perf_counter()), len(self._panes)) # set initial proportion (if not already set) if pinfo.dock_proportion == 0: