So I am trying to see how long it takes my program to run, and the solution I came up with is:
import datetime
time1 = datetime.datetime.now()
[program code]
time2 = datetime.datetime.now()
print(time2 - time1)
I want to know if this is an efficient/correct solution, because all the guides I could find on the internet would use modules such as timeit, etc.
I would appreciate any feedback.