Code example for ScheduledExecutorService

Methods: scheduleAtFixedRate

0
  @Override 
  protected void initializeAstroSources(ArrayList<AstronomicalSource> sources) {
    this.issSource = new IssSource(model, getResources());
    sources.add(issSource);
 
    scheduler.scheduleAtFixedRate(
        new OrbitalElementsGrabber(issSource), 0, 60, TimeUnit.SECONDS);
  } 
 
  @Override 
  public int getLayerId() { 
    return -110; 
  } 
 
  @Override 
  protected int getLayerNameId() { 
    // TODO(brent): Update to different preference 
    return R.string.show_hubble_layer_pref; 
  } 
 
  /** Thread Runnable which parses the orbital elements out of the Url. */