Added time measurement to the algorithm
Merge