clock: initial code by L29Ah