怎么样测试程序运行所需时间
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
。。。。。中间代码。。。
stopwatch.Stop();
long result = stopwatch.ElapsedMilliseconds;sqlBulkCopy.Close();
result 为所需时间,单位毫秒
long result = stopwatch.ElapsedMilliseconds;sqlBulkCopy.Close();
result 为所需时间,单位毫秒
本文来自博客园,作者:VipSoft 转载请注明原文链接:https://www.cnblogs.com/vipsoft/archive/2012/04/22/2465243.html