Detailed code for electronic clock production