diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2018-01-05 01:15:09 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2019-01-29 01:17:32 +0100 |
commit | f246eaece0b8885f64856bee93c87a0e2b5e5976 (patch) | |
tree | 01b5d644f15dcde894af540e03ca5e02bf92e9f0 | |
parent | 986c6ec685d90c0afd6ea4a0d80b4611d00143d3 (diff) | |
download | batteriewarner-f246eaece0b8885f64856bee93c87a0e2b5e5976.tar.gz batteriewarner-f246eaece0b8885f64856bee93c87a0e2b5e5976.zip |
remove println!() and sleep during the loop
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index b404cfa..4632f6f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,13 +61,11 @@ fn indicate_battery_level(level: u32) -> Result<()> { Ok(()) } -#[allow(unused)] fn main() { loop { let p = read_battery_percentage(); match p { Ok(level) => { - println!("Battery Level: {}", level); if level < 20 { match indicate_battery_level(level) { Err(e) => panic!("Error: {}", e), @@ -77,5 +75,6 @@ fn main() { } Err(e) => panic!("Error: {}", e), } + sleep(Duration::from_secs(10)); } }
\ No newline at end of file |