Sets an interval that fires at the given interval with respect to when it was fired.
const start = Date.now(); // 5555// interval fires every secondsetAbsoluteInterval(()=>{ const now = Date.now(); console.log(`${now}: FIRED`);}, 1000);// ideal output:// 6555: FIRED// 7555: FIRED// 8555: FIRED// etc... Copy
const start = Date.now(); // 5555// interval fires every secondsetAbsoluteInterval(()=>{ const now = Date.now(); console.log(`${now}: FIRED`);}, 1000);// ideal output:// 6555: FIRED// 7555: FIRED// 8555: FIRED// etc...
A callback that is fired on the interval.
The interval to fire the callback at.
An ID that tracks this interval.
Sets an interval that fires at the given interval with respect to when it was fired.