public static Long update ( final long now ) { final long estNow = EstTime . m_now ; if ( estNow == now ) { return null ; } EstTime . m_now = now ; /* * Check if updating the estimated time was especially tardy. * I am concerned that the thread responsible for updating the estimated * time might be blocking on something and want to be able to log if * that happens */ if ( now - estNow > ESTIMATED_TIME_WARN_INTERVAL ) { /* * Only report the error every 60 seconds to cut down on log spam */ if ( lastErrorReport > now ) { //Time moves backwards on occasion, check and reset lastErrorReport = now ; } if ( now - lastErrorReport > maxErrorReportInterval ) { lastErrorReport = now ; return now - estNow ; } } return null ; }
Don t call this unless you have paused the updater and intend to update yourself