//监听代码块执行时间 Stopwatch sw = new Stopwatch(); sw.Start(); sw.Stop(); Console.WriteLine("{0}_执行时间:{1} ms", "func_"+ DateTime.Now.ToString("yyyy-mmd-dd HH:mm:ss:fff"), sw.ElapsedMilliseconds); //sw.Restart();