mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(util) time, timeEnd
This commit is contained in:
parent
85360248a4
commit
c230918d2d
1 changed files with 10 additions and 12 deletions
22
lib/util.js
22
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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue