Time delay for function calling

I am beginer in MCU programming.I have a digital sensor ,arduino and a relay. If the digital sensor attach to arduino give a output LOW for a certain period of time(say 10 sec) continuously then the relay should be triggered. How to write codes for this. Please some body post the sample codes for this operation.

Record the time when the input goes low.
If the current time is greater than 10000ms after the recorded time AND the input is still LOW then trigger the relay.

AWOL:
Record the time when the input goes low.
If the current time is greater than 10000ms after the recorded time AND the input is still LOW then trigger the relay.

actually I am a newbie..please write the sample codes .

Take a look at the blink without delay example in the IDE.

AWOL:
Take a look at the blink without delay example in the IDE.

That condition seems to be different from this condition.

It's a start, and contains all the elements you need.

AWOL:
It's a start, and contains all the elements you need.

I will be thankful if you write the codes for me.

I will happily help you if you post your code.

AWOL:
I will happily help you if you post your code.

Dear friend ..if I am able to write my code..then why should I post my problem.Sir please write the code for me.I cant understand the program logic you are talking about.So it will be helpful if you write the code

I cant understand the program logic you are talking about.

And yet you use the term "MCU".
Hmmm.

Seriously, everything you need is in the blink without delay example - play around with it and rearrange some bits.

This isn't a homework service.