unimonkiez / self-adjusting-interval

setInterval which works on browser, Node and React Native, like it should have
21 stars 0 forks source link

performance.now() #2

Open kofifus opened 5 years ago

kofifus commented 5 years ago

why not use performance.now() instead of Date.now() ?

unimonkiez commented 5 years ago

You are definitely right!
Better in this use case

lukaszdebowski commented 5 years ago

Keep in mind that performance.now() does not work in React Native