Fix T76610: DXF export fails with Python 3.8
Replace use of removed time.clock(), solution suggested by Paul Morelle.
This commit is contained in:
parent
980668439a
commit
b4f07c45de
Notes:
blender-bot
2023-02-14 18:55:37 +01:00
Referenced by issue #76610, Exception in exportDXF: AttributeError on time.clock
|
@ -35,7 +35,7 @@ def exportDXF(context, filePath, settings):
|
|||
"""
|
||||
print("----------\nExporting to {}".format(filePath))
|
||||
import time
|
||||
time1 = time.clock()
|
||||
time1 = time.perf_counter()
|
||||
|
||||
if settings['verbose']:
|
||||
print("Generating Object list for export... (Root parents only)")
|
||||
|
@ -71,7 +71,7 @@ def exportDXF(context, filePath, settings):
|
|||
|
||||
drawing.convert(filePath)
|
||||
|
||||
duration = time.clock() - time1
|
||||
duration = time.perf_counter() - time1
|
||||
print('%s objects exported in %.2f seconds. -----DONE-----' %\
|
||||
(exported, duration))
|
||||
except IOError:
|
||||
|
|
Loading…
Reference in New Issue