类 TimeUtil
java.lang.Object
com.alibaba.csp.sentinel.util.TimeUtil
- 所有已实现的接口:
Runnable
Provides millisecond-level time of OS.
Here we should see that not all the time TimeUtil should keep looping 1_000 times every second (Actually about 800/s due to some losses).
* In idle conditions it just acts as System.currentTimeMillis(); * In busy conditions (significantly more than 1_000/s) it keeps loop to reduce costs.For detail design and proposals please goto https://github.com/alibaba/Sentinel/issues/1702
- 作者:
- qinan.qn, jason
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
-
构造器详细资料
-
TimeUtil
public TimeUtil()
-
-
方法详细资料
-
run
public void run() -
getState
Current running state- 返回:
-
currentQps
Current qps statistics (including reads and writes request) excluding current working time window for accurate result.- 参数:
now-- 返回:
-
getTime
public long getTime()Current timestamp in milliseconds.- 返回:
-
instance
-
currentTimeMillis
public static long currentTimeMillis()
-