Skip to content

Instantly share code, notes, and snippets.

@nathanpc
Created June 23, 2012 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanpc/2976012 to your computer and use it in GitHub Desktop.
Save nathanpc/2976012 to your computer and use it in GitHub Desktop.
Timers on BlackBerry Java
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() {
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
// Do something when the timer ticks
}
});
}
}, 0, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment