KPMG interview question

Fetch data from API exactly after 10 sec of inactivity