2-3-04-09 内置模块-time

  • UTC/GMT:世界时间
  • 本地时间:本地时区的时间。

Python中关于时间处理的模块有两个,分别是time和datetime

2.1 time

import time

# 获取当前时间戳(自1970-1-1 00:00)
v1 = time.time()
print(v1)

# 时区
v2 = time.timezone

# 停止n秒,再执行后续的代码。
time.sleep(5)
posted @ 2022-10-26 23:30  布丁家的苏苏  Views(2)  Comments(0)    收藏  举报