function Sleep should pass million seconds
support window