- private static TDoubleArrayList sample(StreamIterator iter, double end, double timeWindow, int maxSamples, boolean resample) throws HistoryException, IOException {
- //System.out.println("sample: " + end + ", " + timeWindow + ", " + maxSamples + ", " + resample);
- ExportInterpolation numberInterpolation = ExportInterpolation.LINEAR_INTERPOLATION;
+ private static TDoubleArrayList sample(StreamIterator iter, double endTime, double timeWindow, int maxSamples, boolean resample) throws HistoryException, IOException {
+ double fromTime = endTime - timeWindow;
+ //System.out.println("sample: [" + fromTime + " .. " + endTime + "] window = " + timeWindow + " s, max samples = " + maxSamples + ", resample = " + resample);
+ ExportInterpolation interpolation = ExportInterpolation.LINEAR_INTERPOLATION;