Stopwatch watch = new Stopwatch(); watch.Start(); //DO STUFF watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds);