Skip to content

Instantly share code, notes, and snippets.

@Mo-Shakib
Last active January 22, 2021 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mo-Shakib/b64120c0b5619bd76b29e7c7c9039ec6 to your computer and use it in GitHub Desktop.
Save Mo-Shakib/b64120c0b5619bd76b29e7c7c9039ec6 to your computer and use it in GitHub Desktop.
Get execution time in python
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