Package me.ahoo.cosid.util
Class Clock.CacheClock
java.lang.Object
me.ahoo.cosid.util.Clock.CacheClock
- Enclosing interface:
- Clock
Fix the problem that
System.currentTimeMillis()
is too slow.
The accuracy is 1 second-
Nested Class Summary
Nested classes/interfaces inherited from interface me.ahoo.cosid.util.Clock
Clock.CacheClock, Clock.SystemClock
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Tolerate a one-second time limit. -
Constructor Summary
-
Method Summary
-
Field Details
-
ONE_SECOND_PERIOD
public static final long ONE_SECOND_PERIODTolerate a one-second time limit.
-
-
Constructor Details
-
CacheClock
-
-
Method Details
-
secondTime
public long secondTime()- Specified by:
secondTime
in interfaceClock
-
run
public void run()
-