Using setInterval and clearInterval