mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
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:
parent
02888959a2
commit
a1d6f29e87
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user