using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace TimeSpanTest { class Program { static void Main(string[] args) { TimeSpan TS = new TimeSpan(0, 0, 0, 2, 500); Stopwatch SW = new Stopwatch(); SW.Start(); Console.WriteLine("Start:[{0}]",DateTime.Now); while (TS > SW.Elapsed) System.Threading.Thread.Sleep(100); Console.WriteLine("End:[{0}]",DateTime.Now); return; } } }