Best practice for throwing timeout

Keywords: c#

Question: 

I have a long running task, if the task goes for say more than 10seconds I want to cancel the task , and stop the execution and move to next API call .

What is the best way to implement it. I saw some answers using timers.

Answers: