static void Main(string[] args)
{
Stopwatch sw = new Stopwatch();
long num = 0;
sw.Reset();
sw = Stopwatch.StartNew();
for (int i = 1; i <100000000; i++) num += 1;
sw.Stop();
TimeSpan el = sw.Elapsed;
Console.WriteLine("花费 {0} ", el);
long ms = sw.ElapsedMilliseconds;
Console.WriteLine("花费 {0} 毫秒", ms);
long tk = sw.ElapsedTicks;
Console.WriteLine("花费 {0} ticks", tk);
Console.ReadKey();
}