private long requestStat(ITimeStamp currentTime, int offSet, Iterator<TimeElement> iter, BufferType type){
		long res = 0;
		while(iter.hasNext()){
			TimeElement element = iter.next();
			long currentOffSet;
			switch(type){
				case SEC:
					currentOffSet = currentTime.secDiff(element.getStartTime());
					break;
				case MIN:
					currentOffSet = currentTime.minDiff(element.getStartTime());
					break;
				case HOUR:
					currentOffSet = currentTime.hourDiff(element.getStartTime());
					break;
				case DAY:
					currentOffSet = currentTime.dayDiff(element.getStartTime());
					break;
				default:
					throw new RuntimeException("Invalid Buffer Type");
			}
			if(currentOffSet <= offSet){
				res += element.getRequestNum();
			}else{
				break;
			}
		}
		return res;
	}