Code example for Time

Methods: aftersetToNow

0
		Time lastRunPlus4Sec = new Time();
 
		if (lastRun != null)
			lastRunPlus4Sec.set(lastRun.toMillis(false) + 4000);
 
		Time now = new Time();
		now.setToNow();
 
		if (lastRun == null || now.after(lastRunPlus4Sec))
		{ 
			RemoteViews updateViews = createUpdate(c);
			if (updateViews != null)
			{ 
				ComponentName thisWidget = new ComponentName(c,
						LoveWidget.class); 
				AppWidgetManager man = AppWidgetManager.getInstance(c);
				man.updateAppWidget(thisWidget, updateViews);
			} 
 
			now.setToNow();
			lastRun = now;
		} 
		// Log.d("TimedTask", "ended run"); 
 
	} 
Stop searching for code, let great code find you!  Add Codota to your java IDE