private void Exercise(LineIntersector lineIntersector) { Console.WriteLine(lineIntersector.GetType().Name); var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < 1000000; i++) { ExerciseOnce(lineIntersector); } sw.Stop(); Console.WriteLine($"Milliseconds elapsed: {sw.ElapsedMilliseconds}"); }