Create wait vs sleep vs yield method