python 获取时间戳

在 Python 中通过 time.time() 函数获取纪元秒数,它可以把从 epoch 开始之后的秒数以浮点数格式返回。

import time
print(time.time())
# 输出结果 1615257195.558105