public long getDuration ( TimeUnit unit ) { if ( unit == null ) throw new IllegalArgumentException ( ) ; return unit . convert ( durationInNanos , TimeUnit . NANOSECONDS ) ; }
Get the duration value in the supplied unit of time .