Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - ♻️ Timer refactor to duration.✨ Add Stopwatch struct. #1151

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Revert timer example to the previous one
  • Loading branch information
kokounet committed Dec 26, 2020
commit 168e5422fc9a804f04f37eaa58c93f23ac272d69
2 changes: 1 addition & 1 deletion examples/ecs/timers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Default for Countdown {

fn setup_system(commands: &mut Commands) {
// Add an entity to the world with a timer
commands.spawn((Timer::<Entity>::from_seconds(5.0, false),));
commands.spawn((Timer::<()>::from_seconds(5.0, false),));
}

/// This system ticks all the `Timer` components on entities within the scene
Expand Down