public void CreateRanges(int[] secRanges, FlushCB f = null) { currentRanges = new StatRange[secRanges.Length]; lastRanges = new StatRange[secRanges.Length]; for (int i = 0; i < secRanges.Length; i++) { lastRanges[i] = currentRanges[i] = new StatRange(secRanges[i]); } flushCallback = f; }
public void CreateRanges(int[] secRanges, MongoRange[] pranges, FlushCB f = null) { currentRanges = new StatRange[secRanges.Length]; lastRanges = new StatRange[secRanges.Length]; for (int i = 0; i < secRanges.Length; i++) { StatRange sr = new StatRange(secRanges[i]); for (int j = 0; j < pranges.Length; j++) { if (pranges[j].SecondsInterval == secRanges[i]) { sr.Restore(pranges[j]); break; } } lastRanges[i] = currentRanges[i] = sr; } flushCallback = f; }