Package jazzparser :: Package utils :: Module base :: Class ExecutionTimer
[hide private]
[frames] | no frames]

Class ExecutionTimer

source code

object --+
         |
        ExecutionTimer

Very simple class to wrap up a common method for measuring the execution time of some code. A timer is started when the object is created. Then call get_time() to find out how long its been running in miliseconds.

By default, this will use time.time() and will therefore measure wall time between starting the timer and ending. You can specify clock=True to report CPU clock time used by the process, using time.clock(). This will make a difference on Unix, but not on Windows, where time.clock() just returns wall time.

Instance Methods [hide private]
 
__init__(self, clock=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_time(self) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, clock=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)