1.1 --- a/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java Tue Feb 24 11:12:53 2015 +0100
1.2 +++ b/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java Tue Jan 26 04:36:23 2016 +0100
1.3 @@ -47,6 +47,7 @@
1.4 private final Http.Resource[] http;
1.5 private final InvocationContext c;
1.6 Object value;
1.7 + int time;
1.8
1.9 Bck2BrwsrCase(Method m, String type, Launcher l, boolean fail, HtmlFragment html, Http.Resource[] http) {
1.10 this.l = l;
1.11 @@ -75,8 +76,10 @@
1.12 }
1.13 }
1.14 }
1.15 - String res = c.invoke();
1.16 - value = res;
1.17 + int[] time = { 0 };
1.18 + String res = c.invoke(time);
1.19 + this.value = res;
1.20 + this.time = time[0];
1.21 if (fail) {
1.22 int idx = res == null ? -1 : res.indexOf(':');
1.23 if (idx >= 0) {
1.24 @@ -111,7 +114,9 @@
1.25 }
1.26 } else {
1.27 try {
1.28 + long now = System.currentTimeMillis();
1.29 value = m.invoke(m.getDeclaringClass().newInstance());
1.30 + time = (int) (System.currentTimeMillis() - now);
1.31 } catch (InvocationTargetException ex) {
1.32 Throwable t = ex.getTargetException();
1.33 value = t.getClass().getName() + ":" + t.getMessage();