bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Make methods on `Time`, `Timer`, and `Stopwatch` more consistent

Open rparrett opened this issue 4 months ago • 1 comments

Bevy version

0.14 / main

What you did

Noticed some small inconsistencies between Time, Timer and Stopwatch while refactoring.

What went wrong

This may not be totally comprehensive.

Time Timer Stopwatch
elapsed_seconds elapsed_secs elapsed_secs
elapsed_seconds_f64 DNE elapsed_secs_f64
is_paused paused paused

At a glance, it seems like we should

  • Add _f64 stuff to Timer
  • Rename *_seconds to *_secs or vice versa
  • Rename paused to is_paused or vice versa

Additional information

When deciding on renames there may be other methods to look at (animation, audio, whatever) with similarly-named methods. e.g. AudioSink::is_paused, Duration::from_secs.

rparrett avatar Oct 10 '24 20:10 rparrett