import time as t
class MyTimer():
def __init__(self):
self.unit=['年','月','日','时','分','秒']
self.borrow = [0, 12, 31, 24, 60, 60]
self.prompt='未开始计时'
self.lasted=[]
self.begin=0
self.end=0
def __str__(self):
return self.prompt
__repr__=__str__
def __add__(self, other):
prompt='总共运行了:'
result=[]
python练习题,计算运行时间
最新推荐文章于 2024-04-23 15:30:00 发布