What is the best way to measure execution time of a function? [duplicate]

System.Environment.TickCount and the System.Diagnostics.Stopwatch class are two that work well for finer resolution and straightforward usage.

See Also:

  • Is DateTime.Now the best way to measure a function’s performance?
  • High resolution timer in .NET
  • Environment.TickCount vs DateTime.Now
  • What’s the best way to benchmark programs in Windows?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)