]>
code.octet-stream.net Git - netwatcher/blob - examples/watch.rs
   1 use std
::time
::Duration
; 
   4     let _handle 
= netwatcher
::watch_interfaces(|update
| { 
   5         println
!("Interface update!"); 
   6         println
!("State: {:?}", update
.inter
faces
); 
   7         println
!("Diff: {:?}", update
.diff
); 
  11         std
::thread
::sleep(Duration
::from_secs(60));