Atmega Microcontroller interrupt delay function on button press
Atmega micros have hardware interrupts that can be used to accomplish this. Interrupts can be used with interrupt handlers (short functions that are called when an interrupt is triggered) called "Interrupt Service Routine" (ISR) in atmel speak to accomplish short tasks that you would like to be called asynchronously with primary control "thread". 

_delay_ms is a busy-wait delay so there is no harm in calling shorter spans of it (say every 100ms and decrementing a counter).  If you write a short interrupt handler to set a global flag you can have the loop check the flag every iteration and break out of it sooner. Otherwise you can also continuously check the button state in your loop with a finer grain delay without interrupts if the project will stay as simple as it already is. 

Interrupts can be disabled and enabled dynamically, so there is no concern that your button press will change program state outside of the loop of interest. Its pretty straight forward (one memory address write) to enable and disable interrupt vectors before and after the delay loop runs. 

see for example:

this external forum post

this tutorial 

official atmel clib documentation on atmega interrupt service routines

this technical application note from atmel

a short tutorial note from atmel

Review the doc 'sheet' for your micro for even more detailed implementation notes.