added the McuSleep function and solved the atomic statement problem