Simplified time sync master logic. Needs to be reviewed and improved later.