Fix time measurement
This commit is contained in:
parent
f2c98ba95e
commit
91a39dd000
1 changed files with 2 additions and 2 deletions
|
@ -332,7 +332,7 @@ module ts {
|
||||||
var program = createProgram(fileNames, compilerOptions, compilerHost);
|
var program = createProgram(fileNames, compilerOptions, compilerHost);
|
||||||
var exitStatus = compileProgram();
|
var exitStatus = compileProgram();
|
||||||
|
|
||||||
var end = start - new Date().getTime();
|
var end = new Date().getTime() - start;
|
||||||
|
|
||||||
if (compilerOptions.listFiles) {
|
if (compilerOptions.listFiles) {
|
||||||
forEach(program.getSourceFiles(), file => {
|
forEach(program.getSourceFiles(), file => {
|
||||||
|
@ -357,7 +357,7 @@ module ts {
|
||||||
reportTimeStatistic("Bind time", ts.bindTime);
|
reportTimeStatistic("Bind time", ts.bindTime);
|
||||||
reportTimeStatistic("Check time", ts.checkTime);
|
reportTimeStatistic("Check time", ts.checkTime);
|
||||||
reportTimeStatistic("Emit time", ts.emitTime);
|
reportTimeStatistic("Emit time", ts.emitTime);
|
||||||
reportTimeStatistic("Total time", start - end);
|
reportTimeStatistic("Total time", end);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { program, exitStatus };
|
return { program, exitStatus };
|
||||||
|
|
Loading…
Reference in a new issue