Run and stop a method for a minute
问题 timer1= new System.Windows.Forms.Timer(); timer1.Interval =60000; // 1 min timer1.Start(); MyMethodName(); timer1.Stop(); MyMethodName() -has a for loop for 90,000 entries (and some validations inside that for loop). for (int i = 0; i <= 90000; i++) { //validations go here } When the time in timer1 is done for a minute, i want to stop executing other entries in the for loop. For example, if 45,000 entries are done in a minute, i want to stop executing the method ie. stop the method after a