async def sleep_until(when: datetime.datetime, result: Optional[T]=None) -> Optional[T]:
    '|coro|\n\n    Sleep until a specified time.\n\n    If the time supplied is in the past this function will yield instantly.\n\n    .. versionadded:: 1.3\n\n    Parameters\n    -----------\n    when: :class:`datetime.datetime`\n        The timestamp in which to sleep until. If the datetime is naive then\n        it is assumed to be local time.\n    result: Any\n        If provided is returned to the caller when the coroutine completes.\n    '
    delta = compute_timedelta(when)
    return (await asyncio.sleep(delta, result))
|coro|

Sleep until a specified time.

If the time supplied is in the past this function will yield instantly.

.. versionadded:: 1.3

Parameters
-----------
when: :class:`datetime.datetime`
    The timestamp in which to sleep until. If the datetime is naive then
    it is assumed to be local time.
result: Any
    If provided is returned to the caller when the coroutine completes.
async def sleep_until(when: datetime.datetime, result: Optional[T]=None) -> Optional[T]:
    '|coro|\n\n    Sleep until a specified time.\n\n    If the time supplied is in the past this function will yield instantly.\n\n    .. versionadded:: 1.3\n\n    Parameters\n    -----------\n    when: :class:`datetime.datetime`\n        The timestamp in which to sleep until. If the datetime is naive then\n        it is assumed to be local time.\n    result: Any\n        If provided is returned to the caller when the coroutine completes.\n    '
    delta = compute_timedelta(when)
    return (await asyncio.sleep(delta, result))