欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

node.js中的console.time方法使用說(shuō)明

 更新時(shí)間:2014年12月09日 09:15:00   投稿:junjie  
這篇文章主要介紹了node.js中的console.time方法使用說(shuō)明,本文介紹了console.time的方法說(shuō)明、語(yǔ)法、接收參數(shù)、使用實(shí)例和實(shí)現(xiàn)源碼,需要的朋友可以參考下

方法說(shuō)明:

開(kāi)始時(shí)間,與console.timeEnd對(duì)應(yīng),記錄時(shí)間段。

語(yǔ)法:

復(fù)制代碼 代碼如下:

console.time(label)

接收參數(shù):

Label             與開(kāi)始時(shí)間 console.log 的 label 對(duì)應(yīng)

例子:

復(fù)制代碼 代碼如下:

console.time('100-elements');
for (var i = 0; i < 100; i++) {
  ;
}
console.timeEnd('100-elements');

源碼:

復(fù)制代碼 代碼如下:

Console.prototype.time = function(label) {
  this._times[label] = Date.now();
};

相關(guān)文章

最新評(píng)論