Skip to content

Commit

Permalink
Adds doc note that Timer and Stopwatch must be progressed manually (b…
Browse files Browse the repository at this point in the history
…evyengine#13441)

# Objective
- Fix bevyengine#13421 

## Solution

- Add an explicit note at the root of each struct that they must be
ticked manually

## Testing

- Generated the docs and the changes look good
---

---------

Co-authored-by: François Mockers <francois.mockers@vleue.com>
Co-authored-by: Matty <weatherleymatthew@gmail.com>
  • Loading branch information
3 people authored and salvadorcarvalhinho committed May 24, 2024
1 parent 0066fc9 commit 65d248d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_time/src/stopwatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use bevy_utils::Duration;

/// A Stopwatch is a struct that track elapsed time when started.
///
/// Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.
/// # Examples
///
/// ```
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_time/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use bevy_utils::Duration;
/// exceeded, and can still be reset at any given point.
///
/// Paused timers will not have elapsed time increased.
///
/// Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called.
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serialize", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Default))]
Expand Down

0 comments on commit 65d248d

Please sign in to comment.