public class UITimer extends Object
| Modifier | Constructor and Description | 
|---|---|
| protected  | UITimer()This constructor is useful when deriving this class to implement a timer. | 
|   | UITimer(Runnable r)Constructor that accepts a runnable to invoke on timer elapse | 
| Modifier and Type | Method and Description | 
|---|---|
| void | cancel()Stops executing the timer | 
| void | schedule(int timeMillis,
        boolean repeat,
        Form bound)Binds the timer to start at the given schedule | 
| static UITimer | timer(int timeMillis,
     boolean repeat,
     Form parent,
     Runnable r)Convenience method to schedule a UITimer more easily | 
| static UITimer | timer(int timeMillis,
     boolean repeat,
     Runnable r)Convenience method to schedule a UITimer more easily on the current form | 
protected UITimer()
public UITimer(Runnable r)
r - runnable instancepublic void schedule(int timeMillis,
                     boolean repeat,
                     Form bound)
timeMillis - the time from now in millisecondsrepeat - whether the timer repeatsbound - the form to which the timer is boundpublic static UITimer timer(int timeMillis, boolean repeat, Form parent, Runnable r)
timeMillis - the time from now in millisecondsrepeat - whether the timer repeatsparent - the form to which the timer is boundr - callback when the timer elapsespublic static UITimer timer(int timeMillis, boolean repeat, Runnable r)
timeMillis - the time from now in millisecondsrepeat - whether the timer repeatsr - callback when the timer elapsespublic void cancel()