public double getEstimatedBufferFill() {
        // check to see if any messages have been sent
        int lastMessageTs = engine.getLastMessageTimestamp();
        if (lastMessageTs < 0) {
            // nothing has been sent yet
            return 0.0;
        }
        // buffer size as requested by the client
        final long buffer = getClientBufferDuration();
        if (buffer == 0) {
            return 100.0;
        }
        // duration the stream is playing
        final long delta = System.currentTimeMillis() - engine.getPlaybackStart();
        // expected amount of data present in client buffer
        final long buffered = lastMessageTs - delta;
        return (buffered * 100.0) / buffer;
    }
public double getEstimatedBufferFill ( ) { int lastMessageTs = engine . getLastMessageTimestamp ( ) ; if ( lastMessageTs < 0 ) { return 0.0 ; } final long buffer = getClientBufferDuration ( ) ; if ( buffer == 0 ) { return 100.0 ; } final long delta = System . currentTimeMillis ( ) - engine . getPlaybackStart ( ) ; final long buffered = lastMessageTs - delta ; return ( buffered * 100.0 ) / buffer ; }
{@inheritDoc}