Panda3D
Public Member Functions | Public Attributes | List of all members
_Timer Class Reference
Inheritance diagram for _Timer:
Thread _Verbose

Public Member Functions

def __init__ (self, interval, function, args=[], kwargs={})
 
def cancel (self)
 
def run (self)
 
- Public Member Functions inherited from Thread
def __init__ (self, group=None, target=None, name=None, args=(), kwargs=None, verbose=None)
 
def __repr__ (self)
 
def getName (self)
 
def is_alive (self)
 
def isDaemon (self)
 
def join (self, timeout=None)
 
def setDaemon (self, daemonic)
 
def setName (self, name)
 
def start (self)
 
- Public Member Functions inherited from _Verbose
def __init__ (self, verbose=None)
 
def __init__ (self, verbose=None)
 

Public Attributes

 args
 
 finished
 
 function
 
 interval
 
 kwargs
 

Additional Inherited Members

- Static Public Attributes inherited from Thread
def isAlive = is_alive
 

Detailed Description

Call a function after a specified number of seconds:

t = Timer(30.0, f, args=[], kwargs={})
t.start()
t.cancel() # stop the timer's action if it's still waiting

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  interval,
  function,
  args = [],
  kwargs = {} 
)

Member Function Documentation

◆ cancel()

def cancel (   self)
Stop the timer if it hasn't finished yet

◆ run()

def run (   self)

Reimplemented from Thread.

Member Data Documentation

◆ args

args

◆ finished

finished

◆ function

function

◆ interval

interval

◆ kwargs

kwargs