import datetime
start = datetime.datetime.now()
"""运行的代码块"""
end = datetime.datetime.now()
print('Running time: %s Seconds'%(end - start))
from time import time
start = time()
"""运行的代码块"""
end = time()
print('running time is :%s seconds'%(end - start))