mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-07-31 20:50:15 +02:00
Now logs the time taken to run non OpenSCAD commands in cmd_times.txt
This commit is contained in:
@@ -47,7 +47,12 @@ def do_cmd(cmd, output = sys.stdout):
|
||||
for arg in cmd:
|
||||
print(arg, end = " ")
|
||||
print()
|
||||
return subprocess.call(cmd, stdout = output, stderr = output)
|
||||
t = time.time()
|
||||
rv = subprocess.call(cmd, stdout = output, stderr = output)
|
||||
elapsed = time.time() - t
|
||||
with open("cmd_times.txt", 'at') as f:
|
||||
print(cmd[0], cmd[-1], elapsed, file = f)
|
||||
return rv
|
||||
|
||||
def compare_images(a, b, c):
|
||||
if not os.path.isfile(b):
|
||||
|
Reference in New Issue
Block a user