Skip to content

Instantly share code, notes, and snippets.

@dsaiztc
Created June 7, 2014 10:41
Show Gist options
  • Select an option

  • Save dsaiztc/44fd90aeddebd848a648 to your computer and use it in GitHub Desktop.

Select an option

Save dsaiztc/44fd90aeddebd848a648 to your computer and use it in GitHub Desktop.
Shedule periodic tasks.
ScheduledExecutorService mScheduledExecutorService = Executors.newScheduledThreadPool(1);;
Future<?> mFuture = mScheduledExecutorService.scheduleAtFixedRate(new Runnable()
{
public void run()
{
// Task to do periodically
}
}, 0L, updateTime, TimeUnit.SECONDS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment