Skip to content

Instantly share code, notes, and snippets.

@mortenjust
Last active January 23, 2016 00:01
Show Gist options
  • Save mortenjust/71ce5642f56f19157021 to your computer and use it in GitHub Desktop.
Save mortenjust/71ce5642f56f19157021 to your computer and use it in GitHub Desktop.
Android Timer
Runnable runnable = new Runnable() {
@Override
public void run() {
start();
Log.d(TAG, "run: runner executed after " + delay);
toggleHandler.removeCallbacks(this);
}
};
Log.d(TAG, "start: running runner now");
toggleHandler.postDelayed(runnable, delay);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment