| java.lang.Object | ||
| android.util.ResettableTimeout | ||
Utility class that you can call on with a timeout, and get called back after a given time, dealing correctly with restarting the timeout.
For example, this class is used by the android.os.Vibrator class.
| ResettableTimeout() |
| void | cancel() | ||||
| Cancel the timeout and call off now. | |||||
| void | go(long milliseconds) | ||||
| Does the following steps. | |||||
| abstract | void | off() | |||
| Override this to do what you need to do when it's stopping. | |||||
| abstract | void | on(boolean alreadyOn) | |||
| Override this do what you need to do when it's starting This is called with the monitor on this method held, so be careful. | |||||
Methods inherited
from class
java.lang.Object
1. Call on()
2. Start the timer.
3. At the timeout, calls off()
If you call this again, the timeout is reset to the new one
| alreadyOn | is true if it's currently running |
|---|