Skip to content

Conversation

@cBournhonesque
Copy link
Contributor

@cBournhonesque cBournhonesque commented Dec 14, 2023

Objective

Instant and Duration from the instant crate are exposed in bevy_utils to have a single abstraction for native/wasm.
It would be useful to have the same thing for SystemTime.


Changelog

Added

  • bevy_utils now re-exposes the instant::SystemTime struct

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Utils Utility functions and types A-Time Involves time keeping and reporting labels Dec 14, 2023
@alice-i-cecile
Copy link
Member

Edited your post to add a link to the SystemTime docs :)

@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 14, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 14, 2023
Merged via the queue into bevyengine:main with commit c4aea07 Dec 14, 2023
@doonv
Copy link
Contributor

doonv commented Dec 21, 2023

#10702 has overridden the changes that this PR made:

- pub use instant::{Duration, Instant, SystemTime};
+ pub use web_time::{Duration, Instant};

Should I make a PR to bring back SystemTime?

@cBournhonesque
Copy link
Contributor Author

#10702 has overridden the changes that this PR made:

- pub use instant::{Duration, Instant, SystemTime};
+ pub use web_time::{Duration, Instant};

Should I make a PR to bring back SystemTime?

Ah didn't know that instant was unmaintained; yes could you please add SystemTime ? I would need it for a library I'm working on

@doonv
Copy link
Contributor

doonv commented Dec 21, 2023

Ah alright.

github-merge-queue bot pushed a commit that referenced this pull request Dec 21, 2023
# Objective

#10702 has overridden the changes
that #10980 did.

## Solution

Re-add `SystemTime` to `bevy_utils`, along with a few other types.

---

## Changelog

- Rexported `SystemTime`, `SystemTimeError`, and `TryFromFloatSecsError`
from `bevy_utils`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Time Involves time keeping and reporting A-Utils Utility functions and types C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants