-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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::paused
toTimer::is_paused
, leavingTimer::paused
throughout 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_finished
probably works and follows the rule, but I could also seeTimer::just_finished
continuing 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