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

Hello
Who is supporting the value for the variable X?