using System; using System.Diagnostics; using System.Collections; using System.Threading; namespace DateTimeBug { class DateTimeBug { private const int TestPeriodSec = 10; [STAThread] static void Main(string[] args) { Thread thread = new Thread(new ThreadStart(Run)); thread.Start(); while (thread.IsAlive) { DateTime now = DateTime.UtcNow; } } private static void Run() { DateTime endTime = DateTime.UtcNow.AddSeconds(TestPeriodSec); while (DateTime.UtcNow.Ticks < endTime.Ticks) { } } } }