start = time.time() for i in range(20): alpha.moveRel(0.1 if i < 10 else -0.1) print time.time() - start