mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Use the correct clock time when sleeping on iter_messages
This commit is contained in:
parent
509fba8bcc
commit
cbd5594dba
|
@ -1,7 +1,6 @@
|
|||
import asyncio
|
||||
import itertools
|
||||
import logging
|
||||
import time
|
||||
import warnings
|
||||
from collections import UserList
|
||||
|
||||
|
@ -217,8 +216,9 @@ class MessageMethods(UploadMethods, MessageParseMethods):
|
|||
else:
|
||||
request.max_date = r.messages[-1].date
|
||||
|
||||
now = asyncio.get_event_loop().time()
|
||||
await asyncio.sleep(
|
||||
max(wait_time - (time.time() - start), 0), loop=self._loop)
|
||||
max(wait_time - (now - start), 0), loop=self._loop)
|
||||
|
||||
async def get_messages(self, *args, **kwargs):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user