python获取当前时间毫秒数
from datetime import datetimefrom datetime import timedeltastart_time = datetime.now()returns the elapsed milliseconds since the start of the programdef millis(): dt = datetime.now() - start_time ms = (dt.days 24 60 60 + dt.seconds) 1000 + dt.microseconds/1000.0 return ms
赞0
踩0