Code example for Timer

Methods: schedule

0
{ 
  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()  
    {