minor changes

This commit is contained in:
coderaiser 2013-01-22 09:41:49 -05:00
parent c05aa0be8e
commit ebb85f3feb

View file

@ -491,6 +491,18 @@ Util = exports || {};
return lRet;
};
/**
* exec function if it exist in object
* @pArg
*/
Util.execIfExist = function(pObj, pName, pArg){
var lRet;
if(pObj)
lRet = Util.exec(pObj[pName], pArg);
return lRet;
};
/**
* function do conditional save exec of function
* @param pCondition
@ -525,6 +537,32 @@ Util = exports || {};
return lRet;
};
/**
* start timer
* @pArg
*/
Util.time = function(pArg){
var lRet,
lConsole = Scope.console;
lRet = Util.execIfExist(lConsole, 'time', pArg);
return lRet;
};
/**
* stop timer
* @pArg
*/
Util.timeEnd = function(pArg){
var lRet,
lConsole = Scope.console;
lRet = Util.execIfExist(lConsole, 'timeEnd', pArg);
return this;
};
/**
* Gets current date in format yy.mm.dd hh:mm:ss
*/