- Timestamp:
- Mar 19, 2013, 11:13:17 AM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/backend/appexecution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/appexecution/AppExecution.java
r702 r703 6 6 import java.io.InputStream; 7 7 import java.io.InputStreamReader; 8 import java.util.Date; 8 9 import java.util.List; 9 10 import java.util.Vector; … … 24 25 public static AppExecutionResult executeAndWait(Vector<String> cmdLine) 25 26 throws IOException { 27 long start = new Date().getTime(); 26 28 ProcessBuilder pb = new ProcessBuilder(cmdLine); 27 29 pb.redirectErrorStream(true); … … 44 46 e.printStackTrace(); 45 47 } 46 return new AppExecutionResult(proc.exitValue(), cmdLine, lines); 48 return new AppExecutionResult(proc.exitValue(), cmdLine, lines, 49 (int) (new Date().getTime() - start)); 47 50 } 48 51 -
AE/installer2/src/net/oni2/aeinstaller/backend/appexecution/AppExecutionResult.java
r702 r703 19 19 */ 20 20 public Vector<String> output; 21 /** 22 * Time the app was run for 23 */ 24 public int time; 21 25 22 26 /** … … 27 31 * @param output 28 32 * Output of executed program 33 * @param time 34 * Time of execution in ms 29 35 */ 30 36 public AppExecutionResult(int errorCode, Vector<String> cmdLine, 31 Vector<String> output ) {37 Vector<String> output, int time) { 32 38 this.errorCode = errorCode; 33 39 this.cmdLine = cmdLine; 34 40 this.output = output; 41 this.time = time; 35 42 } 36 43 }
Note:
See TracChangeset
for help on using the changeset viewer.