Python time 模块
2020-04-21 本文已影响0人
Canon_2020
# 当前时间(年-月-日 时-分-秒)
time.strftime('%Y-%m-%d %H-%M-%S', time.localtime())
# 随机时间数
str(round(time.time() * 1000))
# 返回进程运行时间
time.process_time()
# 返回系统运行时间
time.per_counter()
# 当前时间(年-月-日 时-分-秒)
time.strftime('%Y-%m-%d %H-%M-%S', time.localtime())
# 随机时间数
str(round(time.time() * 1000))
# 返回进程运行时间
time.process_time()
# 返回系统运行时间
time.per_counter()