public void configure ( long newCheckInterval ) { long newInterval = newCheckInterval / 10 * 10 ; if ( checkInterval . getAndSet ( newInterval ) != newInterval ) { if ( newInterval <= 0 ) { stop ( ) ; // No more active monitoring lastTime . set ( milliSecondFromNano ( ) ) ; } else { // Start if necessary start ( ) ; } } }
Change checkInterval between two computations in millisecond .