1.秒级 import time startTime = time.time() endTime = time.time() print 2.微秒级 from datetime import datetime start_ = datetime.utcnow() end_ = datetime.utcnow() c = (end_ - start_) print c.seconds print 黄世宇/Shiyu Huang's Persona
1.秒级
import timestartTime = time.time()
endTime = time.time()
2.微秒级
from datetime import datetimestart_ = datetime.utcnow()
end_ = datetime.utcnow()
c = (end_ - start_)
print c.seconds
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/