asp.net 计算程序运行时间

System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
                        sw.Start();
                        postDept = GetNodeDept(post.DepartmentID);
                        sw.Stop();
                        TimeSpan ts = sw.Elapsed;
                        PageAlertMsg("时间为:"+ts.TotalMilliseconds);
View Code

 

posted @ 2017-08-17 10:02  AAABONE  阅读(864)  评论(0编辑  收藏  举报