当前位置:   article > 正文

python 计时方法_Python计时器类| cancel()方法与示例

python timer cancel

python 计时方法

Python Timer.cancel()方法 (Python Timer.cancel() Method)

cancel() is an inbuilt method of the Timer class of the threading module in Python.

cancel()是Python中线程模块的Timer类的内置方法。

Timer class object is representative of an action that must execute only after the given time has passed. This class is a subclass of Thread class. Cancel() method in this class is used to stop the timer and cancel the timer object execution. The action will be stopped only when the timer is still in the waiting area.

计时器类对象代表仅在给定时间过去之后才必须执行的动作。 此类是Thread类的子类。 此类中的Cancel()方法用于停止计时器并取消计时器对象的执行。 仅当计时器仍在等待区域时,操作才会停止。

Module:

模块:

    from threadin
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/863787
推荐阅读
相关标签
  

闽ICP备14008679号