Python 之 用时间戳算运行时间

# find all :找到 RE 匹配的所有子串,并把它们作为一个列表返回
tt = re.findall('^\d{13}',str(time.time()).replace('.',''))[0] 
# 很长的计算....
v = float(re.findall('^\d{13}',str(time.time()).replace('.',''))[0])-float(tt)
print(v)

 

posted @ 2020-11-04 21:55  PEAR2020  阅读(228)  评论(0编辑  收藏  举报