/** * @param startDate the first time stamp * @param pList the list with serialized points * @param ddcThreshold the threshold of the ddc * @return the calculated timestamp using the ddc threshold */ private static long calculateTimeStamp(long startDate, List<MetricProtocolBuffers.Point> pList, long ddcThreshold) { long lastDelta = ddcThreshold; long calculatedPointDate = startDate; for (int i = 1; i < pList.size(); i++) { MetricProtocolBuffers.Point p = pList.get(i); lastDelta = getTimestamp(p, lastDelta); calculatedPointDate += lastDelta; } return calculatedPointDate; }
lastDelta = getTimestamp(p, lastDelta); calculatedPointDate += lastDelta;