MCPcopy
hub / github.com/Textualize/textual / pause

Method pause

src/textual/pilot.py:535–547  ·  view source on GitHub ↗

Insert a pause. Args: delay: Seconds to pause, or None to wait for cpu idle.

(self, delay: float | None = None)

Source from the content-addressed store, hash-verified

533 return True
534
535 async def pause(self, delay: float | None = None) -> None:
536 """Insert a pause.
537
538 Args:
539 delay: Seconds to pause, or None to wait for cpu idle.
540 """
541 # These sleep zeros, are to force asyncio to give up a time-slice.
542 await self._wait_for_screen()
543 if delay is None:
544 await wait_for_idle(0)
545 else:
546 await asyncio.sleep(delay)
547 self.app.screen._on_timer_update()
548
549 async def wait_for_animation(self) -> None:
550 """Wait for any current animation to complete."""

Callers 15

resize_terminalMethod · 0.95
hoverMethod · 0.95
_post_mouse_eventsMethod · 0.95
_on_timer_updateMethod · 0.45
_refresh_layoutMethod · 0.45
auto_pilotFunction · 0.45
__call__Method · 0.45
_pause_blinkMethod · 0.45
_pause_blinkMethod · 0.45
test_tip_gets_a_tooltipFunction · 0.45

Calls 4

_wait_for_screenMethod · 0.95
wait_for_idleFunction · 0.90
sleepMethod · 0.80
_on_timer_updateMethod · 0.80