Suggestions to make things clearer.
Put the code that is to be executed repeatedly in a function.
Create a boolean variable initially set to false and call the action function only when the boolean is true
Set the boolean to true when the start conditions become true not when they are true
Save the start time for the 6 second period at that time
Each time through loop() if the boolean is true and the 6 second period has not elapsed call the action function
When the period has elapsed or some exit condition()s become true set the boolean to false to stop the action