Package icu.easyj.core.clock
Class TickClock
java.lang.Object
icu.easyj.core.clock.TickClock
- All Implemented Interfaces:
IClock,ITickClock,Comparable<ITickClock>
记号时钟
- Author:
- wangliang181230
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong当前微秒数long当前毫秒数long当前纳秒数 注意:值格式与System.nanoTime()并不相同long获取基准微秒数long获取基准记号纳秒数Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface icu.easyj.core.clock.ITickClock
compareTo, getPassedNanos
-
Constructor Details
-
TickClock
public TickClock(long baseEpochMicros, long baseTickNanos) 构造函数- Parameters:
baseEpochMicros- 基准时间微秒数baseTickNanos- 基准记号纳秒数
-
TickClock
public TickClock(long baseEpochMicros) 构造函数- Parameters:
baseEpochMicros- 基准时间微秒数
-
-
Method Details
-
currentTimeMillis
public long currentTimeMillis()Description copied from interface:IClock当前毫秒数- Specified by:
currentTimeMillisin interfaceIClock- Returns:
- timeMillis 毫秒数
-
currentTimeMicros
public long currentTimeMicros()Description copied from interface:IClock当前微秒数- Specified by:
currentTimeMicrosin interfaceIClock- Returns:
- timeMicros 微秒数
-
currentTimeNanos
public long currentTimeNanos()Description copied from interface:IClock当前纳秒数 注意:值格式与System.nanoTime()并不相同- Specified by:
currentTimeNanosin interfaceIClock- Returns:
- timeNanos 纳秒数
-
getBaseEpochMicros
public long getBaseEpochMicros()Description copied from interface:ITickClock获取基准微秒数- Specified by:
getBaseEpochMicrosin interfaceITickClock- Returns:
- baseEpochMicros 基准微秒数
-
getBaseTickNanos
public long getBaseTickNanos()Description copied from interface:ITickClock获取基准记号纳秒数- Specified by:
getBaseTickNanosin interfaceITickClock- Returns:
- baseTickNanos 基准记号纳秒数
-