Solve problem 2

Upgrade timed execution utility to allow the caller to specify the number of loops