Progress Bar for setInterval?

is it possible to create a progress bar which shows the progress of a setInterval?

so if ive used setInterval(foo, 4000); it will “load” up to each function call…