mod clock; pub use self::clock::*; mod microsecond; pub use self::microsecond::*; mod moment; pub use self::moment::*; mod note_duration; pub use self::note_duration::*; mod perf; pub use self::perf::*; mod pulse; pub use self::pulse::*; mod sample_count; pub use self::sample_count::*; mod sample_rate; pub use self::sample_rate::*; mod timebase; pub use self::timebase::*; mod unit; pub use self::unit::*; pub(crate) use ::tek_jack::{*, jack::{*, contrib::*}}; pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicBool, AtomicUsize, Ordering::*}}; pub(crate) use std::ops::{Add, Sub, Mul, Div, Rem}; pub(crate) use ::tengri::{input::*, dsl::*}; pub use ::atomic_float; pub(crate) use atomic_float::*; /// Standard result type. pub(crate) type Usually = Result>; /// Standard optional result type. pub(crate) type Perhaps = Result, Box>; pub trait Gettable { /// Returns current value fn get (&self) -> T; } pub trait Mutable: Gettable { /// Sets new value, returns old fn set (&mut self, value: T) -> T; } pub trait InteriorMutable: Gettable { /// Sets new value, returns old fn set (&self, value: T) -> T; } impl Gettable for AtomicBool { fn get (&self) -> bool { self.load(Relaxed) } } impl InteriorMutable for AtomicBool { fn set (&self, value: bool) -> bool { self.swap(value, Relaxed) } } impl Gettable for AtomicUsize { fn get (&self) -> usize { self.load(Relaxed) } } impl InteriorMutable for AtomicUsize { fn set (&self, value: usize) -> usize { self.swap(value, Relaxed) } } #[cfg(test)] #[test] fn test_time () -> Usually<()> { // TODO! Ok(()) }