timing within a loop

Joes:
yes sorry finding it hard to explain basically when the switch is turned off theres to be a delay before the LED goes off but the delay depends on how long the input was high for so if the button was on for 10s the light will stop on after the button goes low for 10s
but the delay rime can only go upto 30s
i hope ive worded that a bit better

thanks all for your help

Again, there is no question in your post so I'm going to assume you want to know how to do what you described....

From the example I posted above you know when the button is pressed down and when it is released, so recording the time at those instances will tell you how long the button has been pushed down for. From there the blink without delay example takes over and you use the time you calculated as the interval.