try catch for execution time

This commit is contained in:
2016-08-20 07:15:52 +02:00
parent 59f97c3254
commit b8c9508d21
2 changed files with 17 additions and 3 deletions

View File

@ -39,7 +39,14 @@ export let start = function (moduleNameArg: string = "", loaderLengthArg: string
export let stop = function () {
let done = q.defer();
let endTime = process.hrtime(startTime);
let executionTime = (endTime[0] * 1e9 + endTime[1]) / 1000000000;
let executionTime = function(){
try {
return(endTime[0] * 1e9 + endTime[1]);
}
catch(err){
return undefined;
}
}() / 1000000000;
if (doAnimation) {
earlyChild.kill("SIGHUP");
earlyChild.on("close", function () {