Class Timespan

java.lang.Object
ch.njol.skript.util.Timespan
All Implemented Interfaces:
YggdrasilSerializable, Comparable<Timespan>, TemporalAmount

public class Timespan extends Object implements YggdrasilSerializable, Comparable<Timespan>, TemporalAmount
Represents a duration of time, such as 2 days, similar to Duration.
  • Constructor Details

    • Timespan

      public Timespan()
    • Timespan

      public Timespan(long millis)
      Builds a Timespan from the given milliseconds.
      Parameters:
      millis - The milliseconds of Timespan
    • Timespan

      public Timespan(Timespan.TimePeriod timePeriod, long time)
      Builds a Timespan from the given long parameter of a specific Timespan.TimePeriod.
      Parameters:
      timePeriod - The requested TimePeriod
      time - The time of the requested TimePeriod
  • Method Details