Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created October 9, 2017 08:43
StartClock method for a tutorial on the SSaurel's Blog
private void startClock() {
timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
final String hexaTime = getHexaTime();
runOnUiThread(new Runnable() {
@Override
public void run() {
applyColor(hexaTime);
}
});
}
}, 0, 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment