http://www.arduino.cc/playground/Main/GeneralCodeLibrary#Timing_code
Metro and TimedAction will help multitasking.