-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-TimeInvolves time keeping and reportingInvolves time keeping and reportingC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examples
Description
#15962 aligned public apis of Time, Timer and Stopwatch.
Stopwatch::paused was renamed to Stopwatch::is_paused.
But Timer::paused was left as is for some reason (couldn't find why), and also even though it calls Stopwatch::is_paused underneath:
bevy/crates/bevy_time/src/timer.rs
Lines 326 to 328 in 4051465
| pub fn paused(&self) -> bool { | |
| self.stopwatch.is_paused() | |
| } |
- So I think we should rename
Timer::pausedtoTimer::is_paused, leavingTimer::pausedthroughout 0.17, and removing it in 0.18. - Similarly for
Timer::finished->Timer::is_finished. - I note there is
Timer::just_finished. I honestly don't know about that one. I thinkTimer::is_just_finishedprobably works and follows the rule, but I could also seeTimer::just_finishedcontinuing to make sense withjust_being its own category of predicate naming similar to names likehas_ormust_.
I've left the "ready for implementation" tag off until some bike shedding can happen on item 3.
rparrett, dothanhtrung and Pascualex
Metadata
Metadata
Assignees
Labels
A-TimeInvolves time keeping and reportingInvolves time keeping and reportingC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examples