private String getReadableTime ( ) { long ns = getTimeNanos ( ) ; if ( ns < 50L * 1000 ) return ns + " ns" ; if ( ns < 50L * 1000 * 1000 ) return ( ns / 1000 ) + " us" ; if ( ns < 50L * 1000 * 1000 * 1000 ) return ( ns / ( 1000 * 1000 ) ) + " ms" ; return ns / NANOS_IN_SECOND + " s" ; }
Returns a the time in something that is human - readable .