# Print a timer in Python to see how long to run a script

I want to print a timer in the console to optimize my script and see how long it takes to run the script.

• Jul 20 '17 at 9:53

This is one of the fastest way I know:

import time
import random

then = time.time() #Time before the operations start