using System;
using System.Diagnostics;
public class Test
{
public static void Main()
{
// Create new stopwatch
Stopwatch stopwatch = new Stopwatch();
// Begin timing
stopwatch.Start();
System.Threading.Thread.Sleep(500);
// Stop timing
stopwatch.Stop();
Console.WriteLine("Time elapsed: {0}", stopwatch.Elapsed);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3M7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkgICAgIC8vIENyZWF0ZSBuZXcgc3RvcHdhdGNoCiAgICAgICAgICAgIFN0b3B3YXRjaCBzdG9wd2F0Y2ggPSBuZXcgU3RvcHdhdGNoKCk7CiAgICAgICAgICAgIAogICAgICAgICAgICAvLyBCZWdpbiB0aW1pbmcKICAgICAgICAgICAgc3RvcHdhdGNoLlN0YXJ0KCk7CiAgICAgICAgICAgIAogICAgICAgICAgICBTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZC5TbGVlcCg1MDApOwogICAgICAgICAgICAKICAgICAgICAgICAgLy8gU3RvcCB0aW1pbmcKICAgICAgICAgICAgc3RvcHdhdGNoLlN0b3AoKTsKICAgICAgICAgICAgCiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKCJUaW1lIGVsYXBzZWQ6IHswfSIsIHN0b3B3YXRjaC5FbGFwc2VkKTsKCgoJfQp9