Do eggs incubate if catching while walking?
Yes they are. The distance is calculated in timed intervals, not real time, so if you catch Pokemon while walking, the app will just calculate the new distance when you exit the encounter screen.
It's yet unclear, but it looks like it is tracking distance passed every 50-60 seconds.