def wait_for_updates_ex(vim, version, collector=None,
                        max_wait=85, max_update_count=-1):
    """Polling mechanism for property collection

        args:
        :param vim: Vim object
        :param version: version string
        :param collector: PropertyCollector MOR
        :param max_wait: Max time in seconds before the call returns
                       (Default set to 85 as 90 is the http socket timeout)
        :param max_update_count: Max num of ObjectUpdates returned
                               in a single call. Not set if <= 0
    """
    client_factory = vim.client.factory
    waitopts = client_factory.create('ns0:WaitOptions')
    waitopts.maxWaitSeconds = max_wait
    if max_update_count > 0:
        waitopts.maxObjectUpdates = max_update_count
    if not collector:
        collector = vim.service_content.propertyCollector
    return vim.WaitForUpdatesEx(collector,
                                version=version,
                                options=waitopts)