Skip to content

Async Event Handling #110

Answered by kdheepak
ghost asked this question in Q&A
Oct 11, 2023 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

This is a great question and thanks for posting it!

You are right that this part of the book is sending Event::Render 30 times a second, which is completely overkill. I think I'll change it to something more reasonable (4 times a second?) and change Event::Tick to 1 time a second.

The point of having two kinds of ticks, Event::Tick and Event::Render is that sometimes you want to refresh your data at a consistent rate (e.g. every 60 seconds or every second) and sometimes you want to update your UI much faster than that. This is particularly true when you are doing animations or rendering a progress bar or a spinner (which needs to be updated even then there's no user input).

I think it wou…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Comment options

You must be logged in to vote
3 replies
@kdheepak
Comment options

@ghost
Comment options

@joshka
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants