Compensating time shifts