Sensor active duration settings

hi.

Im a new person to arduino. I need to know

How to program the LED to switch on if the LDR is in dark for =/> 5 seconds. not immediately.

Thank you for your help.