Skip to content

Implement Timers - #350

Open
prokopyl wants to merge 8 commits into
masterfrom
timers
Open

prokopyl wants to merge 8 commits into
masterfrom
timers

Conversation

@prokopyl

@prokopyl prokopyl commented Oct 7, 2026

Copy link
Copy Markdown
Member

This PR adds a minimal implementation of timers on all platforms.

You can now call the new WindowContext::create_timer() function to create a timer, that will fire at the specified interval by calling the new (optional) WindowHandler::on_timer() method.

These functions return and use TimerHandles, which can be compared against one another to identify which timer has been fired (if multiple are running).

These handles will also be used in the future when more timer implementations are added, e.g. changing the interval, stopping, pausing, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant