Mains frequency monitor