svelte-grid icon indicating copy to clipboard operation
svelte-grid copied to clipboard

Inicial value of 'lastTime' in throttle function is correct?

Open Lucas32-dev opened this issue 2 years ago • 0 comments

Captura de tela 2022-07-12 104630 The first time throttle function is called will probably ignore the time frame value, due to the immense expression value (now - last Time), because now is a 10 digit number and lastTime is zero. Shouldn't lastTime be inicialized as a new Date()?

Lucas32-dev avatar Jul 12 '22 13:07 Lucas32-dev