C#计时器
int[] iArrary = new int[30000];
Random rd = new Random();
for (int i = 0; i < 30000; i++)
{
iArrary[i] = rd.Next(0, 9999);
}
long begin = DateTime.Now.Ticks;
Program q = new Program();
q.Sort(iArrary);
long end = DateTime.Now.Ticks;
for (int m = 0; m < 30000; m++)
Console.WriteLine("{0}", iArrary[m]);
Console.Write(end - begin);
Console.ReadLine();
Random rd = new Random();
for (int i = 0; i < 30000; i++)
{
iArrary[i] = rd.Next(0, 9999);
}
long begin = DateTime.Now.Ticks;
Program q = new Program();
q.Sort(iArrary);
long end = DateTime.Now.Ticks;
for (int m = 0; m < 30000; m++)
Console.WriteLine("{0}", iArrary[m]);
Console.Write(end - begin);
Console.ReadLine();