Program code edit help

I have a code that works flawlessly and just need some help adding a small line of code that I can't get to work. Long story short, I have a code that when the Arduino receives a signal, it activates two relays to open and close. All I need is for the Arduino to get the signal for a set amount of time before the relays open. AKA, adding a delay.

Do you want other things to happen during the delay? Check out the blink without delay example.

Do you want to stop everything? just use delay(x) where x is the number of milliseconds.

@jasonpsu97, how can we help when you have not posted your program.

The demo Several Things at a Time is an extended example of BWoD and illustrates the use of millis() to manage timing. It may help with understanding the technique.