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 Boolean
canMine()
return true if the time is in the intervals 10-20 or 40-50static long
getBlockTime(long worldInitTime, ESBean esb)
static ESBean
getCurrent()
static ESBean
getCurrent(long worldInitTime)
static ESBean
getESByTime(long worldInitTime, long targetTime)
static long
getNext30Test(Date dateToBeRounded)
static long
getRoundedTime30s(Date dateToBeRounded)
return long value of passed time rounded to 0th or 30th second of passed minutestatic long
getRoundedTimeMils(Date dateToBeRounded, long roundValuelMils)
static boolean
inRange(ESBean base, ESBean param, int range)
static ESBean
subtract(ESBean esb, int slots)
static ESBean
sum(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:
-
-