Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python calculate computation time

import time 
begin = time.time()
''' your script here '''
time.sleep(1)  # store end time 
end = time.time()  # total time taken 
print(f"Total runtime of the program is {end - begin}") 
# https://www.geeksforgeeks.org/python-measure-time-taken-by-program-to-execute/
 
PREVIOUS NEXT
Tagged: #python #calculate #computation #time
ADD COMMENT
Topic
Name
8+7 =