【发布时间】:2017-05-02 07:03:13
【问题描述】:
我希望在 python 中实现计时器,但找不到任何有用的文章。 我的主要目标是实现以下逻辑:
`timer -> 60 seconds to zero
#do stuff
if the user selects to manually reset the timer -> start the time loop again
if user exits -> exit the time loop
reset the timer and again do above steps`
正在寻找实现上述逻辑的语法的文章/信息。
【问题讨论】:
-
您在什么环境下工作?用户是否通过终端、GUI 或浏览器与您的程序交互?
-
使用
time.tme()? -
@tiwo 我目前正在使用终端,但会在烧瓶中升级它以在浏览器中使用它。所以,现在我希望在终端中实现它。
标签: python python-2.7 timer countdown countdowntimer