Refactoring and usage of synced clock