Skip to content

Modern Tui TuiTick

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Application Loop › TuiTick

TuiTick

Returns a command that sends one tick event after a delay; return another to repeat.

Syntax

TuiTick( byval ms as int32 ) as TuiCmd

Description

Deliver one TUIEVENT_TICK after ms milliseconds. IT IS ONE-SHOT: to keep animating, return another TuiTick from the tick you receive. A negative delay clamps to 0 rather than scheduling in the past.

Example

#import "std/tui"
using tui

print TuiTick( 250 ).arg          '' 250
print TuiTick( -5 ).arg           '' 0 -- clamped, never negative
print TuiTick( 250 ).kind = TUICMD_TICK '' -1 (true)

See also

TuiApp TuiApp.Update TuiApp.Shutdown TuiNone TuiQuit TuiSuspend
TuiApp.Init TuiApp.View TuiCmd TuiRedraw TuiInvalidate TuiRun

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Application Loop
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally