private void timeDelay(int iInterval) { DateTime now = DateTime.Now; while (now.AddMilliseconds(iInterval) > DateTime.Now) { } return; }