mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-08 04:38:42 +00:00
[tasks] Only correct for clock drift if an explicit time is given
This commit is contained in:
parent
f2586e9fe7
commit
603681940f
@ -223,7 +223,7 @@ class Loop(Generic[LF]):
|
|||||||
# the next iteration always follows the last iteration.
|
# the next iteration always follows the last iteration.
|
||||||
# Sometimes asyncio is cheeky and wakes up a few microseconds before our target
|
# Sometimes asyncio is cheeky and wakes up a few microseconds before our target
|
||||||
# time, causing it to repeat a run.
|
# time, causing it to repeat a run.
|
||||||
while self._next_iteration <= self._last_iteration:
|
while self._is_explicit_time() and self._next_iteration <= self._last_iteration:
|
||||||
_log.warn(
|
_log.warn(
|
||||||
(
|
(
|
||||||
'Clock drift detected for task %s. Woke up at %s but needed to sleep until %s. '
|
'Clock drift detected for task %s. Woke up at %s but needed to sleep until %s. '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user