From 4247c2ef5a6298448ef3e57c761142ccad31c35e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 31 Jul 2024 13:16:16 -0700 Subject: [PATCH] wip: run --- src/lib.rs | 1 + src/run.rs | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/run.rs 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