SoFunction
Updated on 2025-03-10

Instructions for using the method

Method description:

The time to complete, the time taken between execution and .

grammar:

Copy the codeThe code is as follows:

(label)

Receive parameters:

Label                                                                                                                              �

example:

Copy the codeThe code is as follows:

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

Source code:

Copy the codeThe code is as follows:

= function(label) {
  var time = this._times[label];
  if (!time) {
    throw new Error('No such label: ' + label);
  }
  var duration = () - time;
  ('%s: %dms', label, duration);
};