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

fix(kad,mdns,misc): ensure instant is used instead of std::time #5391

Closed
wants to merge 4 commits into from

Conversation

zvolin
Copy link
Contributor

@zvolin zvolin commented May 15, 2024

Description

std::time is not implemented on platforms like browser wasm and it's usage fails with a runtime error.
This ensures that instant is used everywhere as it is compatible with wasm environments.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

zvolin added 4 commits May 15, 2024 20:19
std::time is not implemented on platforms like browser wasm
and it's usage fails with a runtime error.
This ensures that instant is used everywhere as it is compatible
with wasm environments.
@zvolin zvolin changed the title fix(kad,mdns): ensure instant is used instead of std::time fix(kad,mdns,misc): ensure instant is used instead of std::time May 15, 2024
@dariusc93
Copy link
Member

dariusc93 commented May 15, 2024

mdns would not be compatible with wasm, and for kad, please see #5347

EDIT: To clarify on mdns: it seems to rely on native sockets for its implementation. Not to say that this may change in the future to adapt for other implementation (if mdns is available on the browser beside discovering printers). May not be worth making the change there.

@zvolin
Copy link
Contributor Author

zvolin commented May 15, 2024

closing in favor of #5347 then

@zvolin zvolin closed this May 15, 2024
@zvolin zvolin deleted the fix/replace-time-with-instant branch May 15, 2024 19:07
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