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;
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkxpbnE7CnVzaW5nIFN5c3RlbS5UZXh0OwoKdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOwoKbmFtZXNwYWNlIFRpbWVTcGFuVGVzdAp7CiAgICBjbGFzcyBQcm9ncmFtCiAgICB7CiAgICAgICAgc3RhdGljIHZvaWQgTWFpbihzdHJpbmdbXSBhcmdzKQogICAgICAgIHsKICAgICAgICAgICAgVGltZVNwYW4gVFMgPSBuZXcgVGltZVNwYW4oMCwgMCwgMCwgMiwgNTAwKTsKICAgICAgICAgICAgU3RvcHdhdGNoIFNXID0gbmV3IFN0b3B3YXRjaCgpOwoKICAgICAgICAgICAgU1cuU3RhcnQoKTsKCiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKCJTdGFydDpbezB9XSIsRGF0ZVRpbWUuTm93KTsKCiAgICAgICAgICAgIHdoaWxlIChUUyA+IFNXLkVsYXBzZWQpIFN5c3RlbS5UaHJlYWRpbmcuVGhyZWFkLlNsZWVwKDEwMCk7CiAgICAgICAgICAgIAogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSgiRW5kOlt7MH1dIixEYXRlVGltZS5Ob3cpOwoKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgIH0KfQ==