public void record ( double sample , TimeUnit timeUnit ) { rotate ( ) ; final long sampleNanos = ( long ) TimeUtils . convert ( sample , timeUnit , TimeUnit . NANOSECONDS ) ; for ( AtomicLong max : ringBuffer ) { updateMax ( max , sampleNanos ) ; } }
For use by timer implementations .