脚本跑了多长时间
import time
start = time.time()
print('start time is: %f' % start)
end = time.time()
print('used time: %f secs' % (end - start))
现在的时间
import time
t = time.localtime()
print "time.asctime(t): %s " % time.asctime(t)
脚本跑了多长时间
import time
start = time.time()
print('start time is: %f' % start)
end = time.time()
print('used time: %f secs' % (end - start))
现在的时间
import time
t = time.localtime()
print "time.asctime(t): %s " % time.asctime(t)
本文标题:time模块
本文链接:https://www.haomeiwen.com/subject/cjdgdftx.html
网友评论