public class SystemClockAgent extends Object implements ClockAgent
| Constructor and Description |
|---|
SystemClockAgent() |
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMillis()
|
Calendar |
getCalendar()
替代
Calendar.getInstance() 接口 |
void |
objWait(Object obj,
long millis)
替代
Object.wait(long) 接口 |
void |
sleep(long millis)
替代
Thread.sleep(long) 接口 |
void |
sleep(TimeUnit unit,
long timeout)
替代
TimeUnit.sleep(long) 接口 |
long |
toMillis(long duration,
TimeUnit timeUnit) |
public long currentTimeMillis()
ClockAgentcurrentTimeMillis in interface ClockAgentpublic Calendar getCalendar()
ClockAgentCalendar.getInstance() 接口getCalendar in interface ClockAgentpublic void sleep(long millis)
throws InterruptedException
ClockAgentThread.sleep(long) 接口sleep in interface ClockAgentInterruptedExceptionpublic void objWait(Object obj, long millis) throws InterruptedException
ClockAgentObject.wait(long) 接口objWait in interface ClockAgentInterruptedExceptionpublic void sleep(TimeUnit unit, long timeout) throws InterruptedException
ClockAgentTimeUnit.sleep(long) 接口sleep in interface ClockAgentInterruptedExceptionpublic long toMillis(long duration,
TimeUnit timeUnit)
toMillis in interface ClockAgentCopyright © 2020. All rights reserved.