Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ clock = asyncgui_ext.clock.Clock()
while running:
...

dt = pygame_clock.advance(fps)
dt = pygame_clock.tick(fps)
clock.advance(dt)
```

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "asyncgui-ext-clock"
version = "0.6.1.dev0"
version = "0.6.1"
description = "An event scheduler for asyncgui programs"
authors = ["Nattōsai Mitō <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion sphinx/readme_jp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ APIに渡す時間の単位は統一さえされていれば何でも構いま
while running:
...

dt = pygame_clock.advance(fps)
dt = pygame_clock.tick(fps)
clock.advance(dt)

``Kivy`` を使っているなら以下のようになるでしょう。
Expand Down
3 changes: 1 addition & 2 deletions src/asyncgui_ext/clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def __exit__(self, *__):


class Clock:
__slots__ = ('_cur_time', '_events', '_events_to_be_added', '__weakref__', )

def __init__(self, initial_time=0):
self._cur_time = initial_time
self._events: list[ClockEvent] = []
Expand Down Expand Up @@ -90,6 +88,7 @@ def advance(self, delta_time):
self._events_to_be_added = events

tick = advance
'''An alias of :meth:`advance`.'''

def schedule_interval(self, func, interval) -> ClockEvent:
'''
Expand Down