timer

Function timer 

Source
pub const fn timer(duration: Duration) -> impl IntoAsyncScheduleCommand
Expand description

Delays the task using a Timer.

ยงExamples

use std::time::Duration;
use bevy::prelude::*;
use bevy_async_system::prelude::*;

fn setup_async_systems(mut commands: Commands){
    commands.spawn_async(|schedules| async move{
        schedules.add_system(Update, delay::timer(Duration::from_secs(3))).await;
    });
}