-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
aligning public apis of Time,Timer and Stopwatch #15962
aligning public apis of Time,Timer and Stopwatch #15962
Conversation
It looks like your PR is a breaking change, but you didn't provide a migration guide. Could you add some context on what users should update when this change get released in a new version of Bevy? |
Oh sweet, I got the nag bot working again :D |
I'll write the migration guide now. |
crates/bevy_time/src/time.rs
Outdated
@@ -281,14 +281,14 @@ impl<T: Default> Time<T> { | |||
/// seconds. | |||
#[inline] | |||
pub fn delta_seconds(&self) -> f32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rename these too actually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably wont be too fun to review :D
3663518
to
0809f10
Compare
0809f10
to
9f1d961
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The from_seconds
methods still need to be changed, or are you leaving the from_
methods with the full names?
Looks good otherwise. Ran a few of the examples that use timers and nothings broken. I like seconds
more than secs
, but don't care that much and the uniform api is worth it.
Fixes #15834
Migration Guide
The APIs of
Time
,Timer
andStopwatch
have been cleaned up for consistency with each other and the standard library'sDuration
type. The following methods have been renamed:Stowatch::paused
->Stopwatch::is_paused
Time::elapsed_seconds
->Time::elasped_secs
(including_f64
and_wrapped
variants)