在 Python 中通过 time.time() 函数获取纪元秒数,它可以把从 epoch 开始之后的秒数以浮点数格式返回。
time.time()
epoch
import time print(time.time()) # 输出结果 1615257195.558105
上一篇:python get_clock_info 函数
下一篇:python ctime获取可读时间 localtime将时间戳转换为可读时间