Alarm
public
class
Alarm
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.Alarm
|
A thread which waits for a period of time and then interrupts a specific other thread.
Can call Thread.interrupt()
to get a thread out of a blocking wait, or
ERROR(/Socket#close())
to stop a thread from blocking on a socket read or write.
All time units are in milliseconds.
Summary
Public constructors |
Alarm(long timeout)
Constructor takes the amount of time to wait, in millis.
|
Public constructors
Alarm
public Alarm (long timeout)
Constructor takes the amount of time to wait, in millis.
Parameters |
timeout |
long : The amount of time to wait, in millis |
Throws |
IllegalArgumentException |
if timeout <= 0 .
|
Public methods
addSocket
public void addSocket (Socket intSocket)
Parameters |
intSocket |
Socket |
addThread
public void addThread (Thread intThread)
Parameters |
intThread |
Thread |
didAlarmFire
public boolean didAlarmFire ()