To measure execution times, e.g. to determine the performance of methods or functions, it is useful to have a corresponding class that can measure the elapsed times, similar to a stopwatch. Here an approach to handle this requirement.
Stopwatch Class