From a4d3f8bc5ee25204b7d06e17da69dc394140eb52 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 14 Jan 2024 22:46:17 +0800 Subject: [PATCH] format services/ticktimer-test-client --- services/ticktimer-test-client/src/main.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/services/ticktimer-test-client/src/main.rs b/services/ticktimer-test-client/src/main.rs index e8d0b9140..aa37ab148 100644 --- a/services/ticktimer-test-client/src/main.rs +++ b/services/ticktimer-test-client/src/main.rs @@ -1,29 +1,30 @@ #![cfg_attr(target_os = "none", no_std)] #![cfg_attr(target_os = "none", no_main)] -use log::info; use std::thread::sleep; use std::time::Duration; +use log::info; + fn main() -> ! { log_server::init_wait().unwrap(); log::set_max_level(log::LevelFilter::Trace); info!("my PID is {}", xous::process::id()); - #[cfg(feature="susres-testing")] + #[cfg(feature = "susres-testing")] const DELAY_MS: u64 = 2000; - #[cfg(not(feature="susres-testing"))] + #[cfg(not(feature = "susres-testing"))] const DELAY_MS: u64 = 5000; - #[cfg(feature="susres-testing")] + #[cfg(feature = "susres-testing")] let xns = xous_names::XousNames::new().unwrap(); - #[cfg(feature="susres-testing")] + #[cfg(feature = "susres-testing")] let susres = susres::Susres::new_without_hook(&xns).unwrap(); for i in 0.. { info!("Loop #{}, waiting {} ms", i, DELAY_MS); sleep(Duration::from_millis(DELAY_MS)); - #[cfg(feature="susres-testing")] + #[cfg(feature = "susres-testing")] { info!("initiate suspend"); susres.initiate_suspend().unwrap();