代码运行耗时(毫米)

int countStart = System.Environment.TickCount;  
//计算这行代码运行需要多少秒
DataTable dtUser = dbao.LoginUserAll("", deptID);
int countEnd = System.Environment.TickCount - countStart;

通过得到两个时间差,得到运行耗时

posted @ 2012-03-05 00:41  hejiyong  阅读(146)  评论(0)    收藏  举报