]>
code.octet-stream.net Git - netwatcher/blob - examples/watch.rs
4129dc668a520d3512698af9306eb83f475cbb37
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));