Skip to content

Commit d9a229f

Browse files
committed
typos
1 parent 911925f commit d9a229f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/blog/posts/better-sleep-on-windows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ On macOS and Linux, calling `asynco.sleep` is fairly accurate. If you call `slee
2828

2929
This limit appears holds true for all async primitives on Windows. If you wait for something with a timeout, it will return on a multiple of 15 milliseconds. Fortunately there is work in the CPython pipeline to make this more accurate. Thanks to [Steve Dower](https://twitter.com/zooba) for pointing this out.
3030

31-
This lack of accuracy in the timer meant that timer events were created at a far slower rate that intended. Animation was slower because Textual was waiting too long between updates.
31+
This lack of accuracy in the timer meant that timer events were created at a far slower rate than intended. Animation was slower because Textual was waiting too long between updates.
3232

3333
Once I had figured that out, I needed an alternative to `asyncio.sleep` for Textual's Timer class. And I found one. The following version of `sleep` is accurate to well within 1%:
3434

@@ -39,7 +39,7 @@ from asyncio import get_running_loop
3939
async def sleep(sleep_for: float) -> None:
4040
"""An asyncio sleep.
4141
42-
On Windows this achieves a better granularity that asyncio.sleep
42+
On Windows this achieves a better granularity than asyncio.sleep
4343
4444
Args:
4545
sleep_for (float): Seconds to sleep for.

src/textual/_time.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
async def sleep(sleep_for: float) -> None:
2020
"""An asyncio sleep.
2121
22-
On Windows this achieves a better granularity that asyncio.sleep
22+
On Windows this achieves a better granularity than asyncio.sleep
2323
2424
Args:
2525
sleep_for (float): Seconds to sleep for.

0 commit comments

Comments
 (0)