timeout is in "ms"