@@ -95,15 +95,15 @@ to_nsec{T<:TVal}(t::T) = 1_000_000_000*t.secs + t.nsecs
95
95
convert {T<:TVal} (:: Type{Float64} , t:: T ) = to_sec (t)
96
96
97
97
# 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)
99
99
isless {T<:TVal} (t1:: T , t2:: T ) = to_nsec (t1) < to_nsec (t2)
100
100
101
101
"""
102
102
Rate(hz::Real), Rate(d::Duration)
103
103
104
104
Used to allow a loop to run at a fixed rate. Construct with a frequency or `Duration` and use with
105
105
`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.
107
107
"""
108
108
type Rate
109
109
duration:: Duration
@@ -136,7 +136,8 @@ now() = get_rostime()
136
136
"""
137
137
rossleep(t)
138
138
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.
140
141
"""
141
142
function rossleep (td:: Duration )
142
143
# Busy sleep loop needed to allow both julia and python async activity
166
167
"""
167
168
sleep(t::Duration), sleep(t::Rate)
168
169
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.
171
171
"""
172
172
sleep (t:: Duration ) = rossleep (t)
173
173
sleep (t:: Rate ) = rossleep (t)
0 commit comments