java.lang.Object
ml.karmaconfigs.api.common.utils.string.util.time.TimeCalculator

public final class TimeCalculator extends Object
Karma time calculator
  • Constructor Details

    • TimeCalculator

      public TimeCalculator(Instant source)
      Initialize the time calculator
      Parameters:
      source - the source instant to calculate from
  • Method Details

    • isBefore

      public boolean isBefore()
      Get if the source instant is before now
      Returns:
      if the time happened
    • isAfter

      public boolean isAfter()
      Get if the source instant is after now
      Returns:
      if the time did not happen
    • getTimeLeft

      public long getTimeLeft()
      Get the time left to the source before now
      Returns:
      the time left on the instant to catch now