use std::time::Instant;
#[derive(Debug, Clone)]
pub struct TransitionRecord<S, E> {
pub from_state: S,
pub event: E,
pub to_state: S,
pub timestamp: Instant,
}
pub(crate) type TransitionListener<S> =
Box<dyn Fn(&TransitionRecord<S, <S as crate::machine::TransitionRules>::Event>)>;
pub(crate) type RejectionListener<S> =
Box<dyn Fn(&crate::error::TransitionError<S, <S as crate::machine::TransitionRules>::Event>)>;
pub(crate) type Clock = Box<dyn Fn() -> Instant>;
pub(crate) fn default_clock() -> Clock {
Box::new(Instant::now)
}