summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorSean Riggin <sriggin@gmail.com>2015-05-20 14:03:55 -0600
committerSean Riggin <sriggin@gmail.com>2015-05-26 14:30:10 -0600
commit3e159fa67afe8992a62ebdb00a324e4f133590cb (patch)
tree99dcf384470992c7c09ee191fdf3a99e0a926c77 /src/compiler/scala/tools/nsc/Global.scala
parent0c360f6d285fdea1fb240248b6c857cc942fbede (diff)
downloadscala-3e159fa67afe8992a62ebdb00a324e4f133590cb.tar.gz
scala-3e159fa67afe8992a62ebdb00a324e4f133590cb.tar.bz2
scala-3e159fa67afe8992a62ebdb00a324e4f133590cb.zip
SI-9322 Elapsed times in compiler calculated with
System.currentTimeMillis and System.nanoTime Reverted elapsedTime calculation in compiler to use System.currentTimeMillis, consistent with the start time.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index b233acf271..4430a84f06 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -10,7 +10,6 @@ package nsc
import java.io.{ File, FileOutputStream, PrintWriter, IOException, FileNotFoundException }
import java.net.URL
import java.nio.charset.{ Charset, CharsetDecoder, IllegalCharsetNameException, UnsupportedCharsetException }
-import scala.compat.Platform.currentTime
import scala.collection.{ mutable, immutable }
import io.{ SourceReader, AbstractFile, Path }
import reporters.{ Reporter, ConsoleReporter }
@@ -1487,6 +1486,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
compileUnitsInternal(units, fromPhase)
private def compileUnitsInternal(units: List[CompilationUnit], fromPhase: Phase) {
+ def currentTime = java.util.concurrent.TimeUnit.NANOSECONDS.toMillis(System.nanoTime())
+
units foreach addUnit
val startTime = currentTime