count time of input value

I have sound module and i want make a baby sound monitor. So when my sound module detect a signal, its give a high signal. If that signal give a high signal more than 10 second countinously i want send a msg to the phone. Sending a msg is ok for me. Can anyone help me for this problem?

You need the approach as embodied in BlinkWithoutDelay.

An easy way to implement that, is with the elapsedMillis library. The GettingStarted example shows how it works.

This is an example of code to act when something stays in a particular state for a given time.

btnVal = digitalRead(btnPin);
if (btnVal == HIGH) {    // assumes btn is LOW when pressed
   lastBtnPressMillis = millis();   // btn not pressed so reset clock
if (millis() - lastBtnPressMillis > = interval) {
   // button has been pressed for longer than interval

You would substitute the sound signal for the button.