mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
13 lines
371 B
TypeScript
13 lines
371 B
TypeScript
export function perfStart(prefix: string) {
|
|
if (typeof performance !== 'undefined') {
|
|
performance?.mark?.(`${prefix}-start`);
|
|
}
|
|
}
|
|
|
|
export function perfEnd(prefix: string, measureName: string) {
|
|
if (typeof performance !== 'undefined') {
|
|
performance?.mark?.(`${prefix}-end`);
|
|
performance?.measure?.(measureName, `${prefix}-start`, `${prefix}-end`);
|
|
}
|
|
}
|