actual_start_time = time.clock() start_time = time.time() while ((time.clock() - actual_start_time) < 50): #do stuff
或者:
actual_start_time = time.clock() start_time = time.time() while True: #do stuff if (time.clock() - actual_start_time) > 50): break