switched from Duration struct to u64
This commit is contained in:
parent
3722cd364d
commit
01bd29d021
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ pub struct Config {
|
|||
pub rating_icons: Rating,
|
||||
pub metadata_fields: Vec<Field>,
|
||||
pub player_prefixes: HashMap<String, char>,
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue