var watch = new Stopwatch(); watch.Start(); Action(); watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds);