Pulling synchronization stuff into a new Clock class