8000 Backend Time · Issue #44 · gfxprim/gfxprim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Backend Time #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RobLoach opened this issue Dec 15, 2021 · 4 comments
Open

Backend Time #44

RobLoach opened this issue Dec 15, 2021 · 4 comments

Comments

@RobLoach
Copy link
Contributor

There are a few calls to gettimeofday() through the event system to retrieve the current time. It would be nice if the backend controlled this. This way backends like SDL could have complete control over it and use SDL_GetTicks() or similar.

@RobLoach
Copy link
Contributor Author

Same goes for gp_time_stamp()

@metan-ucw
Copy link
Member

Sounds reasonable, I can look into this when I have some time and as usual patches are welcomed.

@metan-ucw
Copy link
Member
metan-ucw commented Aug 31, 2022

See 483cf4d now only gp_time_stamp() has to be implemented for a given platform, which simplifies the problem quite a bit. Now the question is how to make the gp_time_stamp() implementation selectable. I did make changes in 6d1b1ba so that it's picked only on os=linux but it's still not defined per backend. I will think about how to fix this properly.

@RobLoach
Copy link
Contributor Author

That's really cool. Thanks so much. So depending on which time implementation we're looking for, it would use its own gp_time_stamp() definition. Good thinking.

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

No branches or pull requests

2 participants
0