package au.gov.amsa.risky.format;

import java.io.File;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;

public class DownsampleMain {

	public static void main(String[] args) {
		try {
			File input = new File(System.getProperty("input"));
			File output = new File(System.getProperty("output"));
			Pattern pattern = Pattern.compile(System.getProperty("pattern"));
			long intervalMs = Long.parseLong(System.getProperty("ms"));
			Downsample.downsample(input, output, pattern, intervalMs,
					TimeUnit.MILLISECONDS);
		} catch (RuntimeException e) {
			System.out
					.println("Usage: -Dinput=<input directory> -Doutput=<output directory> -Dpattern=<filename pattern> -Dms=<downsample interval ms>");
		}
	}
}

@@ -458,16 +458,22 @@
 wnsample
+%0A%09%09%09%09%09
 .downsam
@@ -517,16 +517,18 @@
 s,%0A%09%09%09%09%09
+%09%09
 TimeUnit
@@ -541,16 +541,52 @@
 SECONDS)
+.count().toBlocking()%0A%09%09%09%09%09.single()
 ;%0A%09%09%7D ca

add DownsampleMain