@@ -95,15 +95,15 @@ to_nsec{T<:TVal}(t::T) = 1_000_000_000*t.secs + t.nsecs
9595convert {T<:TVal} (:: Type{Float64} , t:: T ) = to_sec (t)
9696
9797# Comparisons
98- == {T<: TVal }(t1:: T , t2:: T ) = (t1. secs == t2. secs) && (t1. nsecs == t2. nsecs)
98+ == {T<: TVal }(t1:: T , t2:: T ) = (t1. secs == t2. secs) && (t1. nsecs == t2. nsecs)
9999isless {T<:TVal} (t1:: T , t2:: T ) = to_nsec (t1) < to_nsec (t2)
100100
101101"""
102102 Rate(hz::Real), Rate(d::Duration)
103103
104104Used to allow a loop to run at a fixed rate. Construct with a frequency or `Duration` and use with
105105`rossleep` or `sleep`. The rate object will record execution time of other work in the loop and
106- modify the sleep time to compensate and keep the loop rate as consistent as possible.
106+ modify the sleep time to compensate, keeping the loop rate as consistent as possible.
107107"""
108108type Rate
109109 duration:: Duration
@@ -136,7 +136,8 @@ now() = get_rostime()
136136"""
137137 rossleep(t)
138138
139- Call the ROS sleep function with a number of seconds, a `Duration` or a `Rate` object.
139+ Sleep and process callbacks for a number of seconds implied by the type and value of `t`, which may
140+ be a real-value, a `Duration` object, or a `Rate` object.
140141"""
141142function rossleep (td:: Duration )
142143 # Busy sleep loop needed to allow both julia and python async activity
166167"""
167168 sleep(t::Duration), sleep(t::Rate)
168169
169- Call the ROS sleep function with a `Duration` or `Rate` object. Use `rossleep` to specify sleep time
170- directly.
170+ Call `rossleep` with a `Duration` or `Rate` object. Use `rossleep` to specify sleep time directly.
171171"""
172172sleep (t:: Duration ) = rossleep (t)
173173sleep (t:: Rate ) = rossleep (t)
0 commit comments