Created
June 7, 2014 10:41
-
-
Save dsaiztc/44fd90aeddebd848a648 to your computer and use it in GitHub Desktop.
Shedule periodic tasks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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