Skip to content

Commit 4fa29d8

Browse files
committed
uasyncio.core: Remove call_at() which takes absolute second time.
uasyncio uses different timebase than CPython's asyncio, so absolute time scheduling compatible with it is impossible. Instead, there's call_at_() which schedules using modular millisecond time.
1 parent ad73ee3 commit 4fa29d8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

uasyncio.core/uasyncio/core.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@ def create_task(self, coro):
2929
# CPython asyncio incompatibility: we don't return Task object
3030

3131
def call_soon(self, callback, *args):
32-
self.call_at(self.time(), callback, *args)
32+
self.call_at_(self.time(), callback, *args)
3333

3434
def call_later(self, delay, callback, *args):
35-
self.call_at(time.ticks_add(self.time(), int(delay * 1000)), callback, *args)
35+
self.call_at_(time.ticks_add(self.time(), int(delay * 1000)), callback, *args)
3636

3737
def call_later_ms(self, delay, callback, args=()):
3838
self.call_at_(time.ticks_add(self.time(), delay), callback, args)
3939

40-
def call_at(self, time, callback, *args):
41-
if __debug__ and DEBUG:
42-
log.debug("Scheduling %s", (time, callback, args))
43-
self.q.push(time, callback, args)
44-
4540
def call_at_(self, time, callback, args=()):
4641
if __debug__ and DEBUG:
4742
log.debug("Scheduling %s", (time, callback, args))

0 commit comments

Comments
 (0)