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);
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); postDept = GetNodeDept(post.DepartmentID); sw.Stop(); TimeSpan ts = sw.Elapsed; PageAlertMsg("时间为:"+ts.TotalMilliseconds);