我正努力每分钟给终端打印一条消息。我不能使用睡觉时间()因为还有其他事情需要继续运行。以下是我目前所掌握的情况,但我确信这样做有更合理的理由
startTime = time.time()
.
..
...
code to run other things
...
..
.
endTime= time.time()
epochTime = int(endTime - startTime)
print ('epochTime: ' + str(epochTime))
if (epochTime % 60):
print ('A minute has passed')
请给我建议一下我的最佳课程
目前没有回答
相关问题 更多 >
编程相关推荐