I have a loop like below
for(int i = 0; i < 10; i++)
{
// some long time processing
}
I want to create a timer, which would check if one processing runs more than 5 minutes. If one processing runs more than 5 minutes, it would stop current processing then start another processing.
Is it possible to make another thread to monitor the main loop?
My program is a console application.