User Tools

Site Tools

한국어

logicpython:cubloc_api:setontimer

This is an old revision of the document!


SetOnTimer

Enable or disable execution of callbacks registered with OnTimer.

Syntax

from cubloc import SetOnTimer
 
SetOnTimer(enabled: bool)

Parameters

  • enabled: True for On, False for Off.

Exceptions

Example

from cubloc import OnTimer, SetOnTimer, Debug, CR
 
def timer_handler():
    Debug("Timer tick", CR)
 
OnTimer(100, timer_handler)
SetOnTimer(False)   # Pause timer callback execution
SetOnTimer(True)    # Resume timer callback execution
logicpython/cubloc_api/setontimer.1775786799.txt.gz · Last modified: by 127.0.0.1