📜  python get time by function - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:02.482000             🧑  作者: Mango

代码示例1
from datetime import datetime
start_time = datetime.now()
# do your work here
end_time = datetime.now()
print('Duration: {}'.format(end_time - start_time))