How much time my code takes?

A very short code (in Python) to check how much time some function takes to be executed:

import time
start_time = time.time()
main()
print time.time() - start_time, "seconds"

Leave a Reply

Your email address will not be published. Required fields are marked *