Two LEDs fading at half cycle rate

your code is sequential and blocking with delay. You need to get rid of the delays.

For extra information and examples look at