title: Find WIFI results with specific time interval in Android
body: <p>I'm working on Android app. and I'm using this code to get wifi results:</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  import android.content.IntentFilter;
  import android.net.wifi.ScanResult;
  import android.net.wifi.WifiManager;
  import android.widget.Toast;
  
  public class WirelessNetworks  
  {
      private static WifiManager wifi;
      private static List&lt;ScanResult&gt; results;
      private static WifiReceiver receiverWifi;
      private static Context context; 
  
      public static void Initial(Context cont)
      {
          context=cont;
          wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
          receiverWifi=new WifiReceiver();
          context.registerReceiver(receiverWifi, 
                  new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
          results=new ArrayList&lt;ScanResult&gt;();
      }
  
      public static void FindNetworks() 
      {
          wifi.startScan();
          results.clear();
          results=wifi.getScanResults();      
          int size = results.size()-1;
          while (size &gt;= 0) 
          {
              String ssid=results.get(size).SSID;
              String mac=results.get(size).BSSID;
              int rssi=results.get(size).level;
              int band=results.get(size).frequency;           
              Globals.DB.insert(ssid, mac, rssi+"", band+"");
              size--;             
          } 
      }
  
  
      public static class WifiReceiver extends BroadcastReceiver
      {
          @Override
          public void onReceive(Context context, Intent intent) 
          {           
  
          }
      }
  }
  </code></pre>
  
  <p>This function "FindNetworks()" called each 1000 milliseconds.
  The problem is the same results redundancy every 3 or 4 times, I think should increase the interval calling to 4000 milliseconds. 
  But this is problem for my app.
  There is way to get new WIFI readings each 1000 milliseconds immediately?</p>