Timer >>> from timer import Timer >>> with Timer(): ... a = [i for i in range(10000)] ... using 0.000428 seconds.