Implemented code that sums time any no of times