Skip to content
Permalink
Browse files

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
  • Loading branch information
tmathmeyer authored and nyalldawson committed Oct 25, 2018
1 parent 0288895 commit a1d6f29e87aaadedd6fcb5b23881db8f7f75ba21
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/utils.py
@@ -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

0 comments on commit a1d6f29

Please sign in to comment.
You can’t perform that action at this time.