use std::thread::sleep;
use std::time::Duration;

fn main()  {
    use hotwatch::{Event, Hotwatch};
    let mut hotwatch = Hotwatch::new().expect("Hotwatch failed to initialize.");
    hotwatch.watch("config.toml".to_string(), |event: Event| {
        if let Event::Write(path) = event {
            println!("War has changed: {:?}", path);
        }
    }).unwrap();
    sleep(Duration::from_secs(9999999));
}
