import time start = time.clock() #当中是你的程序 elapsed = (time.clock() - start) print("Time used:",elapsed)