We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4adc857 commit a2af202Copy full SHA for a2af202
examples/timer_demo/src/main.rs
@@ -10,17 +10,13 @@ fn main() -> Result<(), RclrsError> {
10
let node = executor.create_node("timer_demo")?;
11
let worker = node.create_worker::<usize>(0);
12
let timer_period = Duration::from_secs(1);
13
- let _timer = worker.create_timer_repeating(
14
- timer_period,
15
- move |count: &mut usize| {
16
- *count += 1;
17
- println!(
18
- "Drinking 🧉 for the {}th time every {:?}.",
19
- *count,
20
21
- );
22
- }
23
- )?;
+ let _timer = worker.create_timer_repeating(timer_period, move |count: &mut usize| {
+ *count += 1;
+ println!(
+ "Drinking 🧉 for the {}th time every {:?}.",
+ *count, timer_period,
+ );
+ })?;
24
25
executor.spin(SpinOptions::default()).first_error()
26
}
0 commit comments