Last active
January 22, 2021 21:56
-
-
Save Mo-Shakib/b64120c0b5619bd76b29e7c7c9039ec6 to your computer and use it in GitHub Desktop.
Get execution time in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
startTime = time.time() | |
# write your code or function calls | |
endTime = time.time() | |
totalTime = endTime - startTime | |
print('Time taken to execute code =', totalTime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment