fn periodical_network_scan(&mut self, event_loop: &mut EventLoop<Self>) {
        let now     = time::precise_time_s();
        let elapsed = now - self.last_scan;
        let delta   = NETWORK_SCAN_PERIOD - elapsed;

        let timeout = if delta <= 0.0 {
            self.scan_network(event_loop);
            NETWORK_SCAN_PERIOD
        } else {
            delta
        };

        event_loop.timeout_ms(
                TimerEvent::ScanNetwork,
                (timeout * 1000.0) as u64)
            .unwrap();
    }
/// Scan the local network for new services and schedule the next network
/// scanning event.
Scan the local network for new services and schedule the next network
scanning event.
Scan the local network for new services and schedule the next network scanning event .
fn periodical_network_scan(&mut self, event_loop: &mut EventLoop<Self>) {
        let now     = time::precise_time_s();
        let elapsed = now - self.last_scan;
        let delta   = NETWORK_SCAN_PERIOD - elapsed;
        let timeout = if delta <= 0.0 {
            self.scan_network(event_loop);
            NETWORK_SCAN_PERIOD
        } else {
            delta
        };
        event_loop.timeout_ms(
                TimerEvent::ScanNetwork,
                (timeout * 1000.0) as u64)
            .unwrap();
    }
fn periodical_network_scan ( & mut self , event_loop : & mut EventLoop < Self > ) { let now = time :: precise_time_s ( ) ; let elapsed = now - self . last_scan ; let delta = NETWORK_SCAN_PERIOD - elapsed ; let timeout = if delta <= 0.0 { self . scan_network ( event_loop ) ; NETWORK_SCAN_PERIOD } else { delta } ; event_loop . timeout_ms ( TimerEvent :: ScanNetwork , ( timeout * 1000.0 ) as u64 ) . unwrap ( ) ; }
Scan the local network for new services and schedule the next network
scanning event.
Scan the local network for new services and schedule the next network scanning event .
&mut self
event_loop
&mut EventLoop<Self>
&mut self
event_loop
&mut EventLoop<Self>