Periodically logs the output of a callback function by calling it at a certain rate and gathering up the results into a list. More...
Public Member Functions | |
def | __init__ |
initializes the logger but doesn't start it | |
def | get_ret_vals |
If max_calls sets to automatically terminate, return the ret vals. | |
def | start |
begins the logger | |
def | stop |
stops the monitor | |
Public Attributes | |
args | |
beg_time | |
cb | |
is_running | |
max_calls | |
num_calls | |
rate | |
ret | |
thread | |
Private Member Functions | |
def | _run |
Periodically logs the output of a callback function by calling it at a certain rate and gathering up the results into a list.
Definition at line 4 of file periodic_funs.py.
def kelsey_sandbox::periodic_funs::PeriodicLogger::__init__ | ( | self, | |
callback, | |||
rate = 0.01 , |
|||
args = None |
|||
) |
initializes the logger but doesn't start it
callback | the function to be called each time |
rate | the rate in seconds at which to call the callback |
args | the function arguments to pass into the callback |
Definition at line 11 of file periodic_funs.py.
def kelsey_sandbox::periodic_funs::PeriodicLogger::_run | ( | self | ) | [private] |
Definition at line 35 of file periodic_funs.py.
If max_calls sets to automatically terminate, return the ret vals.
Definition at line 69 of file periodic_funs.py.
def kelsey_sandbox::periodic_funs::PeriodicLogger::start | ( | self, | |
max_calls = None |
|||
) |
begins the logger
max_calls | the maximum number of times to call the callback |
Definition at line 25 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.
Definition at line 11 of file periodic_funs.py.