public class AlarmClock
extends java.lang.Object
A separate thread periodically tests the queue for alarms ready.
Constructor and Description |
---|
AlarmClock() |
Modifier and Type | Method and Description |
---|---|
long |
extractAlarm(long now,
boolean isTest)
Returns the next alarm ready to run
|
boolean |
queueAt(Alarm alarm,
long wakeTime)
Queue the alarm for wakeup.
|
java.lang.String |
toString() |
public boolean queueAt(Alarm alarm, long wakeTime)
delta
- time in milliseconds to wakepublic long extractAlarm(long now, boolean isTest)
public java.lang.String toString()
toString
in class java.lang.Object