Timer or Delay ?!

Good Night

How can i put a timer on Button state HIGH for ex: 100 millis?

buttonState = digitalRead(buttonPin);
if (buttonState == LOW)
digitalWrite(laserPin, HIGH);
else {
digitalWrite(laserPin, LOW);

can someone help me ?!


What do you mean by "put a timer on Button state HIGH"? Describe what you want the program to do. Be verbose. Use more than just one or two sentences. Explain it like we can't see inside your head. Cause we can't.

You make a note of the time that the button went HIGH, then you check each time loop() executes to see if it has been 100ms since that happened.