Want to terminate operations or calculations after a certain time.

Hello there,
I am here for help.

I am building a shiny app for forecasting data. Sometimes datasets are very long and it needs a huge time to calculate and forecast. I want to track the execution time. If it passes 10 sec, the system will terminate the calculation and show a message/alert/text to the user. How can I do this??

Thanks in advance.

**I am very new in this shiny sector.

I recently left a related answer here.