Use time.process_time() instead of time.clock()

time.clock is set to be deprecated in python3.8,
and was replaced by time.process_time in python3.3
This commit is contained in:
Ted Meyer 2018-10-24 22:09:16 -07:00 committed by Nyall Dawson
parent 02888959a2
commit a1d6f29e87

View File

@ -328,7 +328,8 @@ def startPlugin(packageName):
errMsg = QCoreApplication.translate("Python", "Couldn't load plugin '{0}'").format(packageName)
start = time.clock()
start = time.process_time()
# create an instance of the plugin
try:
plugins[packageName] = package.classFactory(iface)
@ -350,7 +351,7 @@ def startPlugin(packageName):
# add to active plugins
active_plugins.append(packageName)
end = time.clock()
end = time.process_time()
plugin_times[packageName] = "{0:02f}s".format(end - start)
return True