mirror of https://github.com/sbt/sbt.git
print API phase time only if it is enabled
This commit is contained in:
parent
72f20c2f9a
commit
c951156d9f
|
|
@ -27,11 +27,13 @@ final class API(val global: Global, val callback: xsbti.AnalysisCallback) extend
|
||||||
def name = API.name
|
def name = API.name
|
||||||
def run: Unit =
|
def run: Unit =
|
||||||
{
|
{
|
||||||
val start = System.currentTimeMillis
|
|
||||||
if(java.lang.Boolean.getBoolean("sbt.api.enable"))
|
if(java.lang.Boolean.getBoolean("sbt.api.enable"))
|
||||||
|
{
|
||||||
|
val start = System.currentTimeMillis
|
||||||
currentRun.units.foreach(processUnit)
|
currentRun.units.foreach(processUnit)
|
||||||
val stop = System.currentTimeMillis
|
val stop = System.currentTimeMillis
|
||||||
println("API phase took : " + ((stop - start)/1000.0) + " s")
|
println("API phase took : " + ((stop - start)/1000.0) + " s")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
def processUnit(unit: CompilationUnit)
|
def processUnit(unit: CompilationUnit)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue