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
收藏
关注
评论
原文地址:https://www.cnblogs.com/yidengbone/p/7380087.html