AdPushup interview question

How will you implement setInterval function by just using setTimeout?