Code example for Timer

Methods: cancel, purge

0
		} 
	} 
 
	public void stopTimer() { 
		if (t != null) { 
			t.cancel(); 
			t.purge(); 
		} 
	} 
 
	public void restartTimer() { 
		float refresh = prefs.getFloat(PREFERENCE_REFRESH, 2); 
		t = new Timer(); 
		t.schedule(new MyTimer(handler, mapview), 0, (int) (refresh * 60000)); 
	} 
 
	@Override 
	public void onProviderDisabled(String arg0) { 
	} 
 
	@Override