程序包 org.coodex.util
类 Clock
java.lang.Object
org.coodex.util.Clock
Clock为系统提供抽象的时钟获取接口,可根据系统参数设置时间速率。
系统配置项:
系统配置项:
org.coodex.util.Clock.baseline
org.coodex.util.Clock.magnification
-
字段详细资料
-
KEY_MAGNIFICATION
-
-
构造器详细资料
-
Clock
public Clock()
-
-
方法详细资料
-
now
- 返回:
- 获取当前时间,可以通过外部注入
- 另请参阅:
-
getMagnification
-
currentTimeMillis
public static long currentTimeMillis()- 返回:
- “人间”当前时间戳
- 另请参阅:
-
getCalendar
- 返回:
- “人间”当前时间
- 另请参阅:
-
sleep
- 参数:
millis- 毫秒数- 抛出:
InterruptedException- InterruptedException- 另请参阅:
-
objWait
- 参数:
obj- objmillis- millis- 抛出:
InterruptedException- InterruptedException- 另请参阅:
-
sleep
- 参数:
timeUnit- timeUnittimeout- timeout- 抛出:
InterruptedException- InterruptedException- 另请参阅:
-
toMillis
-