接口 ClockAgent
public interface ClockAgent
-
方法概要
修饰符和类型方法说明longvoid替代Object.wait(long)接口voidsleep(long millis) 替代Thread.sleep(long)接口void替代TimeUnit.sleep(long)接口long
-
方法详细资料
-
currentTimeMillis
long currentTimeMillis()- 返回:
- 替代
System.currentTimeMillis()接口
-
getCalendar
Calendar getCalendar()- 返回:
- 替代
Calendar.getInstance()接口
-
sleep
替代Thread.sleep(long)接口- 参数:
millis- millis- 抛出:
InterruptedException
-
objWait
替代Object.wait(long)接口- 参数:
obj- objmillis- millis- 抛出:
InterruptedException
-
sleep
替代TimeUnit.sleep(long)接口- 参数:
unit- unittimeout- timeout- 抛出:
InterruptedException
-
toMillis
- 参数:
duration- durationtimeUnit- timeUnit- 返回:
- 替代
TimeUnit.toMillis(long)接口
-