Simplified the Wait1Sec function