bevy/crates/bevy_time
Lenchog 8e14d99fb9
Added finish method for timer (#20154)
# Objective

- Add an easy way to finish a Timer

## Solution

- Tick the timer by the remaining time

## Testing

I have not tested, but it should work
---

## Showcase

```rust
let mut timer = Timer::from_seconds(1.5, TimerMode::Once);
timer.finish();
assert_eq!(timer.remaining(), Duration::from_secs(0))
```

---------

Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-15 22:57:57 +00:00
..
src Added finish method for timer (#20154) 2025-07-15 22:57:57 +00:00
Cargo.toml Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
LICENSE-APACHE Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
LICENSE-MIT Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Time

License Crates.io Downloads Docs Discord

The built-in timekeeping plugin for the Bevy game engine.