-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28d3062
commit 314de84
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#![feature(test)] | ||
|
||
extern crate test; | ||
|
||
|
||
use test::Bencher; | ||
|
||
|
||
use navigator_rs::Navigator; | ||
// use std::thread::sleep; | ||
// use std::time::Duration; | ||
|
||
// fn main() { | ||
// println!("Creating your navigator module!"); | ||
// let mut nav = Navigator::new(); | ||
|
||
// println!("Setting up your navigator, ahoy!"); | ||
// nav.init(); | ||
|
||
// loop { | ||
// nav.set_pwm_channel_value(PwmChannel::All, 0); | ||
// println!("{:#?}", nav.fmt_debug()); | ||
// sleep(Duration::from_millis(1000)); | ||
// } | ||
// } | ||
|
||
|
||
#[bench] | ||
fn init(b: &mut Bencher) { | ||
b.iter(|| { | ||
let mut nav = Navigator::new(); | ||
let _ = nav.init(); | ||
}); | ||
} | ||
|
||
// #[bench] | ||
// fn bench_fib_20(b: &mut Bencher) { | ||
// b.iter(|| { | ||
// let _ = fib(20); | ||
// }); | ||
// } |