python中计算程序用时的方法

import time

start = time.clock()
......
end = time.clock()
print(end - start)