Wait for Start

Im trying to make a alarm system on my Arduino and as alarms usually do I want it to wait 10 seconds to give the user time to leave before it enters a armed state but am unsure of how to write this.

Thanks in advance, T

In this instance, you might be able to get away with a delay(). Unless you want the user to be able to disarm the alarm during the ten seconds, in which case, you’ll need to use millis(). Store the millis() when the user arms the alarm, then keep checking until millis() - stored > 10000.