Panda3D
Public Member Functions | Public Attributes

Timer Class Reference

Inheritance diagram for Timer:
Thread ThreadBase

List of all members.

Public Member Functions

def __init__
def __setattr__
def cancel
def getName
def is_alive
def isAlive
def isDaemon
def join
def run
def setDaemon
def setName
def start

Public Attributes

 args
 finished
 function
 interval
 kwargs

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

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

Member Function Documentation

def __setattr__ (   self,
  key,
  value 
) [inherited]
def cancel (   self)
Stop the timer if it hasn't finished yet
def getName (   self) [inherited]
def is_alive (   self) [inherited]
def isAlive (   self) [inherited]
def isDaemon (   self) [inherited]
def join (   self,
  timeout = None 
) [inherited]
def run (   self)

Reimplemented from Thread.

def setDaemon (   self,
  daemon 
) [inherited]

Reimplemented in ExternalThread.

def setName (   self,
  name 
) [inherited]
def start (   self) [inherited]

Member Data Documentation

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties