Measure processing time
..
#metho #1
import time
start = time.time()
print("hello")
end = time.time()
print(end - start)
#method #2
from timeit import default_timer as timer
start = timer()
# ...
end = timer()
print(end - start) # Time in seconds, e.g. 5.38091952400282
..
Thank you.
www.marearts.com
No comments:
Post a Comment