pyjsdl :: util :: Timer :: Class Timer

Class Timer

object --+
         |
        Timer

Simple profiling timer. Output log can be directed to 'console' or to 'textarea'. If output is to textarea, may specify log length.
Instance Methods
 
__init__(self, log='console', log_length=5)
x.__init__(...) initializes x; see help(type(x)) for signature
 
get_time(self)
Get current time.
 
set_time(self)
Set current time.
 
lap_time(self, time_i=None, time_f=None, number=100, print_result=True)
Time lapsed since previous set_time. Optional arguments time_i and time_f, number of calls to average, and print_results to output result.
 
set_log(self, log, log_length=5)
Set log output. Argument log can be 'console' or 'textarea'.
 
onMouseDown(self, sender, x, y)
 
onMouseLeave(self, sender)
 
print_log(self, text)
Print text to output.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, log='console', log_length=5)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)