Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8d3e553

Browse files
committedSep 10, 2013
Added execution time to pySlice. Tested with pypy27, slower than C-Python :(
1 parent 5f10c56 commit 8d3e553

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎pySlice.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
from Model3D import STLModel, Vector3, Normal
2828
from svgwrite import Drawing, rgb
2929
import sys
30+
import time
31+
32+
start_time = time.time()
3033

3134
def slice_file(f=None, resolution=0.1):
3235
print("Status: Loading File.")
@@ -133,7 +136,7 @@ def findInterpolatedPoint(A, B):
133136

134137
dwg.save()
135138

136-
print("Status: Finished Outputting Slices.c")
139+
print("Status: Finished Outputting Slices")
137140

138141

139142
if __name__ == '__main__':
@@ -154,3 +157,6 @@ def findInterpolatedPoint(A, B):
154157

155158
args = parser.parse_args()
156159
slice_file(args.file, args.resolution)
160+
161+
end_time = time.time()
162+
print ("Execution Time: %is" % (end_time-start_time))

0 commit comments

Comments
 (0)
Please sign in to comment.