Added parameter to define the number of decimal places for time
formatting