Class TimerTaskTime

java.lang.Object
me.hsgamer.hscore.bukkit.scheduler.TimerTaskTime

public class TimerTaskTime extends Object
The time for repeating task
  • Method Details

    • of

      public static TimerTaskTime of(long delay, long period, TimeUnit unit)
      Create a new time
      Parameters:
      delay - the delay
      period - the period
      unit - the unit
      Returns:
      the time
    • of

      public static TimerTaskTime of(long delayTicks, long periodTicks)
      Create a new time from ticks
      Parameters:
      delayTicks - the delay in ticks
      periodTicks - the period in ticks
      Returns:
      the time
    • getDelay

      public long getDelay()
      Get the delay
      Returns:
      the delay
    • getNormalizedDelay

      public long getNormalizedDelay()
      Get the normalized delay. If the delay is less than or equal to 0, it will return 1 or 50 (if fromTicks is true).
      Returns:
      the normalized delay
    • getPeriod

      public long getPeriod()
      Get the period
      Returns:
      the period
    • getNormalizedPeriod

      public long getNormalizedPeriod()
      Get the normalized period. If the period is less than or equal to 0, it will return 1 or 50 (if fromTicks is true).
      Returns:
      the normalized period
    • getUnit

      public TimeUnit getUnit()
      Get the unit
      Returns:
      the unit
    • getDelayTicks

      public long getDelayTicks()
      Get the delay in ticks
      Returns:
      the delay in ticks
    • getNormalizedDelayTicks

      public long getNormalizedDelayTicks()
      Get the normalized delay in ticks. If the delay is less than or equal to 0, it will return 1.
      Returns:
      the normalized delay in ticks
    • getPeriodTicks

      public long getPeriodTicks()
      Get the period in ticks
      Returns:
      the period in ticks
    • getNormalizedPeriodTicks

      public long getNormalizedPeriodTicks()
      Get the normalized period in ticks. If the period is less than or equal to 0, it will return 1.
      Returns:
      the normalized period in ticks