Class TkmTimeUtils


  • public class TkmTimeUtils
    extends Object
    Author:
    giovanni.antino@h2tcoin.com
    • Constructor Detail

      • TkmTimeUtils

        public TkmTimeUtils()
    • Method Detail

      • 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
      • getCurrent

        public static ESBean getCurrent()
      • getCurrent

        public static ESBean getCurrent​(long worldInitTime)
      • getESByTime

        public static ESBean getESByTime​(long worldInitTime,
                                         long targetTime)
      • sum

        public static ESBean sum​(ESBean esb,
                                 int slots)
      • subtract

        public static ESBean subtract​(ESBean esb,
                                      int slots)
      • inRange

        public static boolean inRange​(ESBean base,
                                      ESBean param,
                                      int range)
      • 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: