package tests; import org.xwt.mips.Runtime; import org.xwt.mips.Interpreter; class SpeedTest { private static long start,end; private static long now() { return System.currentTimeMillis(); } private static void start() { start = now(); } private static void end() { end = now(); } private static float diff() { return ((float)(end-start))/1000; } public static void main(String[] args) throws Exception { float d; if(args.length < 2) { System.err.println("Usage: SpeedTest {classname|mips binary} number_of_runs args"); System.exit(1); } String className = args[0]; int runs = Integer.parseInt(args[1]); if(runs < 5) throw new Error("Runs must be >= 5"); String[] appArgs = new String[args.length-1]; appArgs[0] = className; for(int i=2;i