python 如何获取毫秒级系统时间?下面给大家举个例子:
import time import datetime t = time.time() print (t) #原始时间数据 print (int(t)) #秒级时间戳 print (int(round(t * 1000))) #毫秒级时间戳 nowTime = lambda:int(round(t * 1000)) print (nowTime()); #毫秒级时间戳,基于lambda print (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')) #日期格式化
结果如下:
标签:获取,python,datetime,毫秒,int,时间,time,print From: https://blog.csdn.net/hakesashou/article/details/1411122801499825149.26 1499825149 1499825149257 1499825149257 2017-07-12 10:05:49