ValueType valueType = null;
int numStatsInCurrentTick = 0;
for (int i = 0; i < numTicksInResolution; i++) {
LiveStatistics currStat = liveHash.get(currentMillis);
if (currStat == null || currStat.getValue() == null) {
//No stat for this timeperiod, skipping
} else {
if (valueType == null) {
valueType = ValueType.fromValue(currStat.getValueType());
}
//Add to current
aggregatedValue += currStat.getValue();
numStatsInCurrentTick++;
}
currentMillis += 15000;
}