diff --git a/src/lib.rs b/src/lib.rs index 9796082..ff3601a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ pub mod bvh; pub mod map; +pub mod run; pub mod aabb; pub mod model; pub mod timer; diff --git a/src/run.rs b/src/run.rs new file mode 100644 index 0000000..7d0a187 --- /dev/null +++ b/src/run.rs @@ -0,0 +1,67 @@ +use crate::timer::{Timer,Scaled,Error as TimerError}; +use crate::integer::Time; + +pub enum InvalidationReason{ + +} + +#[derive(Debug)] +pub enum Error{ + Timer(TimerError), + AlreadyStarted, + NotStarted, + AlreadyFinished, +} +impl std::fmt::Display for Error{ + fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ + write!(f,"{self:?}") + } +} +impl std::error::Error for Error{} + +pub struct Run{ + timer:Timer, + invalidated:Option, + created:Time, + started:Option