Skip to content

Instantly share code, notes, and snippets.

@WrathChaos
Created November 2, 2015 11:14
Show Gist options
  • Save WrathChaos/b05d517e1e984ad02f82 to your computer and use it in GitHub Desktop.
Save WrathChaos/b05d517e1e984ad02f82 to your computer and use it in GitHub Desktop.
Calling functions after a delay.
//Here's a runnable/handler combo
Runnable mMyRunnable = new Runnable()
{
@Override
public void run()
{
//Your function or code segment will be here !
}
};
Handler myHandler = new Handler();
myHandler.postDelayed(mMyRunnable, 900); //Message will be delivered in 0.9 second.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment