@Override
  public int compareTo(Timespan timespan)
  {
    if(timespan.getTimeUnit() == getTimeUnit())
      return LangUtils.compare(getDuration(), timespan.getDuration());
    else
      return LangUtils.compare(getDurationInMilliseconds(), timespan.getDurationInMilliseconds());
  }
@Override
  public int compareTo(Timespan timespan)
  {
    if(timespan.getTimeUnit() == getTimeUnit())
      return LangUtils.compare(getDuration(), timespan.getDuration());
    else
      return LangUtils.compare(getDurationInMilliseconds(), timespan.getDurationInMilliseconds());
  }
@ Override public int compareTo ( Timespan timespan ) { if ( timespan . getTimeUnit ( ) == getTimeUnit ( ) ) return LangUtils . compare ( getDuration ( ) , timespan . getDuration ( ) ) ; else return LangUtils . compare ( getDurationInMilliseconds ( ) , timespan . getDurationInMilliseconds ( ) ) ; }
Compares 2 timespan. Based on duration in milliseconds.

@param timespan
@return 0 if same duration in milliseconds,
Compares 2 timespan . Based on duration in milliseconds .