How can i execute the a particluar loop for specified time
Timeinsecond = 600 int time = 0; while (Timeinsecond > time) { // do something here }
Instead of such an expensive operation I'd recommend this: It's nasty but it's better to sit than running for doing nothing heating the cpu unnecesarily, the question is may be academic.
using System.Threading; Thread.Sleep(600000);