diff --git a/src/main.rs b/src/main.rs index 2d34df2..9c7ef7f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +use core::time; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::thread; @@ -48,7 +49,8 @@ fn main() { } loop { - thread::sleep(cfg.update_delay); + // thread::sleep(cfg.update_delay); + thread::sleep(time::Duration::from_millis(cfg.update_delay)); match cli.debug { true => print_players(&pf), false => default_loop(&pf, &cfg, &mut data), diff --git a/src/structs/config.rs b/src/structs/config.rs index 032dcb6..a6945bb 100644 --- a/src/structs/config.rs +++ b/src/structs/config.rs @@ -58,13 +58,13 @@ pub struct Config { pub rating_icons: Rating, pub metadata_fields: Vec, pub player_prefixes: HashMap, - pub update_delay: Duration, + pub update_delay: u64, } impl Default for Config { fn default() -> Self { Config { - update_delay: time::Duration::from_millis(300), + update_delay: 300_u64, metadata_separator: "|".to_owned(), array_separator: '+', hide_output: true,