diff --git a/Cargo.toml b/Cargo.toml index 5202faf374..02de4c4115 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1398,6 +1398,16 @@ description = "Illustrates creating custom system parameters with `SystemParam`" category = "ECS (Entity Component System)" wasm = false +[[example]] +name = "time" +path = "examples/ecs/time.rs" + +[package.metadata.example.time] +name = "Time handling" +description = "Explains how Time is handled in ECS" +category = "ECS (Entity Component System)" +wasm = false + [[example]] name = "timers" path = "examples/ecs/timers.rs" diff --git a/crates/bevy_diagnostic/src/frame_time_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/frame_time_diagnostics_plugin.rs index a17a6a19d4..7d7360a3b7 100644 --- a/crates/bevy_diagnostic/src/frame_time_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/frame_time_diagnostics_plugin.rs @@ -2,7 +2,7 @@ use crate::{Diagnostic, DiagnosticId, Diagnostics, RegisterDiagnostic}; use bevy_app::prelude::*; use bevy_core::FrameCount; use bevy_ecs::prelude::*; -use bevy_time::Time; +use bevy_time::{Real, Time}; /// Adds "frame time" diagnostic to an App, specifically "frame time", "fps" and "frame count" #[derive(Default)] @@ -30,12 +30,12 @@ impl FrameTimeDiagnosticsPlugin { pub fn diagnostic_system( mut diagnostics: Diagnostics, - time: Res