Skip to content

Make methods on Time, Timer, and Stopwatch more consistent #15834

Closed
@rparrett

Description

@rparrett

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TimeInvolves time keeping and reportingC-Code-QualityA section of code that is hard to understand or changeD-TrivialNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions