Created
May 13, 2016 20:21
-
-
Save filipesperandio/fa25b38df3dd01bcf1a029305c2a8cbc to your computer and use it in GitHub Desktop.
This file contains 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
private void shceduleSomething() { | |
final Handler handler = new Handler(); | |
Timer timer = new Timer(); | |
TimerTask doAsynchronousTask = new TimerTask() { | |
@Override | |
public void run() { | |
handler.post(new Runnable() { | |
public void run() { | |
doSomething(); | |
} | |
}); | |
} | |
}; | |
timer.schedule(doAsynchronousTask, 3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment