mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-01-16 13:08:15 +01:00
Now logs the time taken to run non OpenSCAD commands in cmd_times.txt
This commit is contained in:
parent
78b8c2031e
commit
664d04ad93
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ options.json
|
||||
times.txt
|
||||
*_diff.png
|
||||
*.echo
|
||||
cmd_times.txt
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user