Skip to content

Instantly share code, notes, and snippets.

@wuyouchao
Created September 6, 2013 05:44
Show Gist options
  • Save wuyouchao/6459977 to your computer and use it in GitHub Desktop.
Save wuyouchao/6459977 to your computer and use it in GitHub Desktop.
C#获取某个操作时间消耗
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
watch.Start();
for (int i = 0; i < 1000; i++)
{
gcMultiRow1.Sort();
}
watch.Stop();
var useTime = (double)watch.ElapsedMilliseconds / 1000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment