MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / start

Function start

packages/core/profiling/index.ts:38–54  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

36export const time = (global.__time || Date.now) as () => number;
37
38export function start(name: string): void {
39 let info = timers[name];
40
41 if (info) {
42 info.currentStart = time();
43 info.runCount++;
44 } else {
45 info = {
46 totalTime: 0,
47 count: 0,
48 currentStart: time(),
49 runCount: 1,
50 };
51 timers[name] = info;
52 profileNames.push(name);
53 }
54}
55
56export function stop(name: string): TimerInfo {
57 const info = timers[name];

Callers 7

test_isRunningFunction · 0.90
test_reset_profilesFunction · 0.90
test_start_stopFunction · 0.90
test_start_stop_countFunction · 0.90

Calls 2

timeFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected