Added time measurement and calculations.

- Time needed for each attempt is measured
- Average and other statistics are calculated