python 秒数转化为时分秒

def timeCost(self, t_start):
    t_now = time.time()
    m, s = divmod(t_now-t_start, 60)
    h, m = divmod(m, 60)
    return "%02d:%02d:%02d" % (h, m, s)

猜你喜欢

转载自blog.csdn.net/ao1886/article/details/114443636
今日推荐