time: move the timecounter/cyclecounter code into its own file.