Class TkmTimeUtils
- java.lang.Object
-
- com.h2tcoin.takamakachain.utils.threadSafeUtils.TkmTimeUtils
-
public class TkmTimeUtils extends Object
- Author:
- giovanni.antino@h2tcoin.com
-
-
Constructor Summary
Constructors Constructor Description TkmTimeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BooleancanMine()return true if the time is in the intervals 10-20 or 40-50static longgetBlockTime(long worldInitTime, ESBean esb)static ESBeangetCurrent()static ESBeangetCurrent(long worldInitTime)static ESBeangetESByTime(long worldInitTime, long targetTime)static longgetNext30Test(Date dateToBeRounded)static longgetRoundedTime30s(Date dateToBeRounded)return long value of passed time rounded to 0th or 30th second of passed minutestatic longgetRoundedTimeMils(Date dateToBeRounded, long roundValuelMils)static booleaninRange(ESBean base, ESBean param, int range)static ESBeansubtract(ESBean esb, int slots)static ESBeansum(ESBean esb, int slots)
-
-
-
Method Detail
-
getRoundedTimeMils
public static long getRoundedTimeMils(Date dateToBeRounded, long roundValuelMils) throws InvalidParameterException
- Throws:
InvalidParameterException
-
getRoundedTime30s
public static long getRoundedTime30s(Date dateToBeRounded) throws InvalidParameterException
return long value of passed time rounded to 0th or 30th second of passed minute- Parameters:
dateToBeRounded-- Returns:
- Throws:
InvalidParameterException
-
getNext30Test
public static long getNext30Test(Date dateToBeRounded) throws InvalidParameterException
- Throws:
InvalidParameterException
-
getCurrent
public static ESBean getCurrent()
-
getCurrent
public static ESBean getCurrent(long worldInitTime)
-
getESByTime
public static ESBean getESByTime(long worldInitTime, long targetTime)
-
getBlockTime
public static long getBlockTime(long worldInitTime, ESBean esb)
-
canMine
public static Boolean canMine()
return true if the time is in the intervals 10-20 or 40-50- Returns:
-
-