I want to print the time on the serial monitor at the start and end of a signal (Help)

The variable is constant I set a value of 1. In order to make the loop run once.