start = time.clock() #long running #do something other end = time.clock() print end-start 转载于:https://www.cnblogs.com/coodyz/p/10728923.html