Program not working as intended

IF you print the values used when you compute the time, you can eliminate the forest and trees.
Paul