refactor(util) time, timeEnd

This commit is contained in:
coderaiser 2014-05-10 10:19:09 -04:00
parent 85360248a4
commit c230918d2d

View file

@ -969,28 +969,26 @@
/**
* start timer
* @pArg
* @param name
*/
this.time = function(pArg) {
var ret,
lConsole = Scope.console;
this.time = function(name) {
var console = Scope.console;
ret = Util.execIfExist(lConsole, 'time', pArg);
Util.execIfExist(console, 'time', name);
return ret;
return this;
};
/**
* stop timer
* @pArg
* @param name
*/
this.timeEnd = function(pArg) {
var ret,
lConsole = Scope.console;
this.timeEnd = function(name) {
var console = Scope.console;
ret = Util.execIfExist(lConsole, 'timeEnd', pArg);
Util.execIfExist(console, 'timeEnd', name);
return ret;
return this;
};
/**