use super::*;
#[derive(Clone, Copy, Data, Debug, New, PartialEq, PartialOrd)]
pub struct SchedulerConfig {
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
pub fixed_timestep: f64,
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
pub max_frame_time: f64,
}
#[derive(Clone, Data, Debug, New, PartialEq)]
pub struct SchedulerState {
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
#[new(skip)]
pub accumulator: f64,
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
pub last_time: f64,
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
#[new(skip)]
pub running: bool,
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
#[new(skip)]
pub raf_id: Option<i32>,
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
#[new(skip)]
pub update_count: u64,
#[get_mut(pub(crate))]
#[get(type(copy))]
#[set(pub(crate))]
#[new(skip)]
pub frame_count: u64,
}
#[derive(Clone, Data, New)]
pub struct SchedulerHandle {
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub state: Rc<EngineCell<SchedulerState>>,
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub closure_cell: RafClosureCell,
}
#[derive(Data, Default, New)]
pub struct TaskRegistry {
#[get_mut(pub(crate))]
#[get(pub(crate))]
#[set(pub(crate))]
pub(crate) tasks: Vec<Box<dyn Updatable>>,
}
#[derive(Clone, Copy, Data, Debug, New, PartialEq, PartialOrd)]
pub struct TaskHandle {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) id: u64,
}