nl: find the timestamp associated with the given metrics , and remove all metrics objects from the start of the queue up to and including the one provided . note that because of draw coalescing , the metrics object passed in here may not be the one at the head of the queue , and so we must iterate our way through the list to find it . this must only be called from the compositor thread . concode_field_sep DisplayPortMetrics[] mMetrics concode_elem_sep long[] mTimestamps concode_elem_sep String LOGTAG concode_elem_sep int mTail concode_elem_sep int BUFFER_SIZE concode_elem_sep int mHead concode_field_sep boolean add concode_elem_sep void reset
code: long function ( DisplayPortMetrics arg0 ) { int loc0 = mTail ; int loc1 = ( mHead + 1 ) % BUFFER_SIZE ; while ( loc1 != loc0 ) { if ( mMetrics [ loc1 ] . fuzzyEquals ( arg0 ) ) { long loc2 = mTimestamps [ loc1 ] ; mHead = loc1 ; return loc2 ; } loc1 = ( loc1 + 1 ) % BUFFER_SIZE ; } return - 1 ; }