src/com/newrelic/metrics/publish/binding/ComponentData.java
/**
     * Calculate duration from last successful reported timestamp.
     * If last timestamp isn't set, return 60 as default duration.
     * Otherwise, return the time difference between now and the last successful reported timestamp.
     * @return the duration
     */
Calculate duration from last successful reported timestamp.
If last timestamp isn't set, return 60 as default duration.
Otherwise, return the time difference between now and the last successful reported timestamp.
@return the duration
Calculate duration from last successful reported timestamp . If last timestamp isn ' t set return 60 as default duration . Otherwise return the time difference between now and the last successful reported timestamp . @return the duration
private int calculateDuration() {
        if (lastSuccessfulReportedAt == null) {
            return 60; 
        }
        long now = new Date().getTime();
        long duration = (long) Math.ceil((now - lastSuccessfulReportedAt.getTime()) / 1000.0);
        return (int) duration;
    }
private int calculateDuration ( ) { if ( lastSuccessfulReportedAt == null ) { return 60 ; } long now = new Date ( ) . getTime ( ) ; long duration = ( long ) Math . ceil ( ( now - lastSuccessfulReportedAt . getTime ( ) ) / 1000.0 ) ; return ( int ) duration ; }
Calculate duration from last successful reported timestamp.
Calculate duration from last successful reported timestamp .
// default duration // round up duration to whole second