Feedback control in ancient water and mechanical clocks