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 cancel
def run

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 cancel (   self)
Stop the timer if it hasn't finished yet
def run (   self)

Reimplemented from Thread.


Member Data Documentation

 All Classes Namespaces Functions Variables Properties