c# 测试运行时间毫秒级

 long currentMillis = (DateTime.Now.Ticks - (new DateTime(1970, 1, 1, 0, 0, 0, 0)).Ticks) / 10000;
 /*代码*/
 long currentMillis1 = (DateTime.Now.Ticks - (new DateTime(1970, 1, 1, 0, 0, 0, 0)).Ticks) / 10000;
 MessageBox.Show((currentMillis1 - currentMillis).ToString());

 

posted @ 2018-10-26 10:13  紫晶城  阅读(645)  评论(0编辑  收藏  举报