Skip to content
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

use wasm-friendly instant::Instant everywhere #895

Merged
merged 5 commits into from
Nov 22, 2020

Conversation

mrk-its
Copy link
Member

@mrk-its mrk-its commented Nov 19, 2020

It removes conditional compilation directives and uses instant::{Duration, Instant} instead of std::time::{Duration, Instant}
Fixes #881 It should have minimal impact for bevy on native architectures, because instant::Instant is simply type alias to std::time::Instant there.

@karroffel karroffel added A-Build-System Related to build systems or continuous integration C-Feature A new feature, making something new possible labels Nov 19, 2020
@mrk-its mrk-its marked this pull request as ready for review November 20, 2020 09:07
@mrk-its mrk-its changed the title use instant::Instant everywhere use wasm-friendly instant::Instant everywhere Nov 20, 2020
@cart
Copy link
Member

cart commented Nov 21, 2020

can we export Duration and Instant from bevy_utils and use that everywhere? That will cut down on the boilerplate across all of the projects and enables bevy package consumers to do time things without needing to care about wasm / pulling in the right dependency

@cart
Copy link
Member

cart commented Nov 21, 2020

Actually with the exception of bevy_tasks which should might eventually have non-bevy consumers who care about dep-count (ex: atelier assets). It should consume instant directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration C-Feature A new feature, making something new possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FrameTimeDiagnosticsPlugin fails on WASM
3 participants