Skip to content

Commit

Permalink
Use time.process_time() instead of time.clock()
Browse files Browse the repository at this point in the history
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 a1d6f29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/utils.py
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit a1d6f29

Please sign in to comment.