MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / trapDuration

Function trapDuration

packages/core/css/parser.spec.ts:369–375  ·  view source on GitHub ↗
(action: () => void)

Source from the content-addressed store, hash-verified

367
368 it.skip('our parser is fast (this test is flaky, gc, opts.)', () => {
369 function trapDuration(action: () => void) {
370 const [startSec, startMSec] = process.hrtime();
371 action();
372 const [endSec, endMSec] = process.hrtime();
373
374 return (endSec - startSec) * 1000 + (endMSec - startMSec) / 1000000;
375 }
376 const charCodeByCharCodeDuration = trapDuration(() => {
377 let count = 0;
378 for (let i = 0; i < themeCoreLightIos.length; i++) {

Callers 1

parser.spec.tsFile · 0.85

Calls 1

actionFunction · 0.50

Tested by

no test coverage detected