From c230918d2d4f7ed45c4e952106054eaf2ea5054e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 10 May 2014 10:19:09 -0400 Subject: [PATCH] refactor(util) time, timeEnd --- lib/util.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/util.js b/lib/util.js index 734157ae..2c827762 100644 --- a/lib/util.js +++ b/lib/util.js @@ -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; }; /**