changeset 1522:d2eb81e4ddc8

8143297: Nashorn compilation time reported in nanoseconds Reviewed-by: hannesw, sundar
author mhaupt
date Thu, 19 Nov 2015 11:28:34 +0100
parents 744c05874c23
children c15ff29c1295
files src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java	Wed Nov 18 17:12:47 2015 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java	Thu Nov 19 11:28:34 2015 +0100
@@ -46,6 +46,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import java.util.logging.Level;
@@ -684,7 +685,7 @@
 
             if (time > 0L && timeLogger != null) {
                 assert env.isTimingEnabled();
-                sb.append(" in ").append(time).append(" ms");
+                sb.append(" in ").append(TimeUnit.NANOSECONDS.toMillis(time)).append(" ms");
             }
             log.info(sb);
         }