UNPKG

react-native-full-responsive

Version:

Create a fully responsive React Native app for all supported platforms

26 lines (25 loc) 794 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.performanceMeasure = void 0; /** * @param label performance execution time label * @param func the execution time of the function is supposed to be measured * @param count the function should be called a specific number of times, default is `100` */ const performanceMeasure = function (label, func) { let count = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100; if (__DEV__) { console.log(`Running the function for ${count} times`); console.time(label); for (let i = 0; i < count; ++i) { func(); } console.timeEnd(label); } else { func(); } }; exports.performanceMeasure = performanceMeasure; //# sourceMappingURL=performanceMeasure.js.map