emulation of CpuClock(not complete)