Code to wait random time before executing