Skip to main content

throttle

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/app/performance/performanceUtils / throttle

Function: throttle()

throttle<T>(func: T, wait: number): T & { cancel: () => void; }

Defined in: utils/app/performance/performanceUtils.js:253

Throttle a function

Type Parameters​

T​

T extends (...args: any[]) => any

Parameters​

func​

T

Function to throttle

wait​

number

Wait time in milliseconds

Returns​

T & { cancel: () => void; }

Throttled function