Depending upon where in the world you live, AC mains frequency is either 50Hz or 60Hz, and that frequency is maintained accurately enough over time that it can be used as a time reference for a clock.