Note that when using delay(), usually (I can't say in all instances - depends on how the delay() function is implemented in the library and the microcontroller used) the rest of your program is "suspended" during the delay; you can, however, write a different set of routines that can work similar to delay() to allow you to continue doing processing (a form of multitasking) if you need to (however, the timing of this new delay function probably won't be as accurate).