@ 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 .