manage led output

what does not work?
if I press the button the LED lights and goes off after 10 seconds