Package rospy :: Module timer :: Class Rate

Class Rate

source code

object --+
         |
        Rate

Convenience class for sleeping in a loop at a specified rate

Instance Methods
 
__init__(self, hz)
Constructor.
source code
 
sleep(self)
Attempt sleep at the specified rate.
source code

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, hz)
(Constructor)

source code 

Constructor.

Parameters:
  • hz (int) - hz rate to determine sleeping
Overrides: object.__init__

sleep(self)

source code 

Attempt sleep at the specified rate. sleep() takes into account the time elapsed since the last successful sleep().

Raises: