Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created October 9, 2017 08:43
Show Gist options
  • Save ssaurel/55d9def6c65caf3503641ebc859a05a8 to your computer and use it in GitHub Desktop.
Save ssaurel/55d9def6c65caf3503641ebc859a05a8 to your computer and use it in GitHub Desktop.
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