clock sync: small refactoring