Skip to content

Use instant crate for WASM compatibility#702

Merged
mitchmindtree merged 1 commit intonannou-org:masterfrom
Woyten:feature/instant-crate
Feb 27, 2021
Merged

Use instant crate for WASM compatibility#702
mitchmindtree merged 1 commit intonannou-org:masterfrom
Woyten:feature/instant-crate

Conversation

@Woyten
Copy link
Copy Markdown
Contributor

@Woyten Woyten commented Jan 19, 2021

Use instant::Instant instead of std::time::Instant.

instant::Instant is a type alias for std::time::Instant on non-WASM environments. On WASM environments, however, Instant is replaced by a browser-friendly implementation which doesn't crash when Instant::now is called (which would be the case with std::time::Instant).

Relates to #475

@Woyten Woyten force-pushed the feature/instant-crate branch from 2dc45e2 to e42bbc4 Compare January 19, 2021 20:06
@mitchmindtree
Copy link
Copy Markdown
Member

Thanks @Woyten, seems a good place to start :)

@mitchmindtree mitchmindtree merged commit db11d59 into nannou-org:master Feb 27, 2021
@Woyten Woyten deleted the feature/instant-crate branch February 27, 2021 19:42
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.

2 participants