(String argv[])
| 23 | } |
| 24 | |
| 25 | static void parse_params(String argv[]) { |
| 26 | int i = 0; |
| 27 | while (i < argv.length) { |
| 28 | if (argv[i].equals("-help")) { |
| 29 | print_help(); |
| 30 | System.exit(1); |
| 31 | } else if (argv[i].equals("-num_trials")) { |
| 32 | num_trials = java.lang.Integer.valueOf(argv[i + 1]).intValue(); |
| 33 | i += 2; |
| 34 | } else if (argv[i].equals("-tree_depth")) { |
| 35 | tree_depth = java.lang.Integer.valueOf(argv[i + 1]).intValue(); |
| 36 | i += 2; |
| 37 | } else { |
| 38 | System.err.println("Unrecognized option: " + argv[i]); |
| 39 | print_help(); |
| 40 | System.exit(1); |
| 41 | } |
| 42 | } |
| 43 | data = new long[num_tests][num_trials]; |
| 44 | } |
| 45 | |
| 46 | static void print_help() { |
| 47 | System.out.println("java Time\n" + "\t-help print this screen\n" + "\t-num_trials <num> specify number of trials (default: 10)\n" |
no test coverage detected