Skip to content

Commit a1d6f29

Browse files
tmathmeyernyalldawson
authored andcommitted
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
1 parent 0288895 commit a1d6f29

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ def startPlugin(packageName):
328328

329329
errMsg = QCoreApplication.translate("Python", "Couldn't load plugin '{0}'").format(packageName)
330330

331-
start = time.clock()
331+
start = time.process_time()
332+
332333
# create an instance of the plugin
333334
try:
334335
plugins[packageName] = package.classFactory(iface)
@@ -350,7 +351,7 @@ def startPlugin(packageName):
350351

351352
# add to active plugins
352353
active_plugins.append(packageName)
353-
end = time.clock()
354+
end = time.process_time()
354355
plugin_times[packageName] = "{0:02f}s".format(end - start)
355356

356357
return True

0 commit comments

Comments
 (0)