Code example for Timer

Methods: schedule

  private static Timer updater_;
  static public void schedule(final Context context, final long delay, final long period) 
    updater_ = new Timer();
    updater_.schedule(new RegularUpdatesTask(context), delay, period);
  } // schedule 
  static private class RegularUpdatesTask extends TimerTask
    private final Context context_;
    private RegularUpdatesTask(final Context context)
      context_ = context;
    } // RegularUpdates 
    public void run()  
Connect your IDE to all the code out there  Get Codota for Java