mod fixed_timestep; mod stopwatch; #[allow(clippy::module_inception)] mod time; mod timer; pub use fixed_timestep::*; pub use stopwatch::*; pub use time::*; pub use timer::*; use bevy_ecs::system::{Res, ResMut}; use bevy_utils::{tracing::warn, Duration, Instant}; use crossbeam_channel::{Receiver, Sender}; pub mod prelude { //! The Bevy Time Prelude. #[doc(hidden)] pub use crate::{Time, Timer, TimerMode}; } use bevy_app::prelude::*; use bevy_ecs::prelude::*; /// Adds time functionality to Apps. #[derive(Default)] pub struct TimePlugin; #[derive(Debug, PartialEq, Eq, Clone, Hash, SystemLabel)] /// Updates the elapsed time. Any system that interacts with [Time] component should run after /// this. pub struct TimeSystem; impl Plugin for TimePlugin { fn build(&self, app: &mut App) { app.init_resource::