/** * @param timeUnit * the unit of time you want this timespan ass * * @return the duration of this timespan expressed in the time unit provided. Note that all * units below timeUnit will be truncated! (ex: 3h20m45s will return 3 if timeUnit=HOUR). */ public long getDuration(TimeUnit timeUnit) { return truncate(timeUnit).getDuration(); }
/** * @param timeUnit * the unit of time you want this timespan ass * * @return the duration of this timespan expressed in the time unit provided. Note that all * units below timeUnit will be truncated! (ex: 3h20m45s will return 3 if timeUnit=HOUR). */ public long getDuration(TimeUnit timeUnit) { return truncate(timeUnit).getDuration(); }