1.1 --- a/rt/emul/zip/src/main/java/org/apidesign/bck2brwsr/vmzip/ZipResources.java Fri May 09 08:37:20 2014 +0200
1.2 +++ b/rt/emul/zip/src/main/java/org/apidesign/bck2brwsr/vmzip/ZipResources.java Sun May 11 08:10:28 2014 +0200
1.3 @@ -54,7 +54,7 @@
1.4 private byte[] findRes(String res) throws IOException {
1.5 Object arr = findResImpl(res);
1.6 if (arr instanceof FastJar.Entry) {
1.7 - long bef = timeNow();
1.8 + double bef = timeNow();
1.9 InputStream zip = fj.getInputStream((FastJar.Entry)arr);
1.10 arr = readFully(new byte[512], zip);
1.11 putRes(res, arr);
1.12 @@ -97,19 +97,12 @@
1.13 return arr;
1.14 }
1.15
1.16 - private static long timeNow() {
1.17 - double time = m();
1.18 - if (time >= 0) {
1.19 - return (long)time;
1.20 - }
1.21 - return org.apidesign.bck2brwsr.emul.lang.System.currentTimeMillis();
1.22 - }
1.23 @JavaScriptBody(args = {}, body =
1.24 "if (typeof window.performance === 'undefined') return -1;\n"
1.25 + "if (typeof window.performance.now === 'undefined') return -1;\n"
1.26 + "return window.performance.now();"
1.27 )
1.28 - private static native double m();
1.29 + private static native double timeNow();
1.30
1.31
1.32 }