Measure time that a condition is true to then trigger and action

Hi @teqlove86

welcome to the arduino-forum.

Very normal reaction to be confused with these poor written and poorly explained examples given by the Arduino-IDE (and most tutorials) .

The code user gcjr has posted has zero explanations and non-selfexplaining names. Very likely to be confusing for a newcomer.

To understand how to apply non-blocking timing based on millis().
Read this tutorial. It explains the basic principle with an everyday example.

best regards Stefan