python---time
import time
print(time.time()) ##1970到现在的经过的秒数
print(time.ctime()) ##固定格式的当前时间
time.sleep(2) #休眠几秒
print(time.asctime()) ##转换为asc码显示当前时间
print(time.strftime("%y-%m-%d %H-%M-%S")) #时间戳
from time import *
print(time())
print(ctime())
sleep(2)
print(asctime())
print(strftime("%y-%m-%d %H-%M-%S"))

浙公网安备 33010602011771号