pub struct Stopwatch { /* private fields */ }
Expand description
The stopwatch calculates durations by matching messages on the start and stop ports. For example, a “job 1” message arrives at the start port at time 0.1, and then a “job 1” message arrives at the stop port at time 1.3. The duration for job 1 will be saved as 1.2. The status reporting provides the average duration across all jobs. The maximum or minimum duration job is also accessible through the metric and job ports.
Implementations
sourceimpl Stopwatch
impl Stopwatch
pub fn from_value(value: Value) -> Option<Box<dyn ReportableModel>>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Stopwatch
impl<'de> Deserialize<'de> for Stopwatch
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl DevsModel for Stopwatch
impl DevsModel for Stopwatch
fn events_ext(
&mut self,
incoming_message: &ModelMessage,
services: &mut Services
) -> Result<(), SimulationError>
fn events_int(
&mut self,
services: &mut Services
) -> Result<Vec<ModelMessage>, SimulationError>
fn time_advance(&mut self, time_delta: f64)
fn until_next_event(&self) -> f64
sourceimpl Reportable for Stopwatch
impl Reportable for Stopwatch
sourceimpl SerializableModel for Stopwatch
impl SerializableModel for Stopwatch
impl ReportableModel for Stopwatch
Auto Trait Implementations
impl RefUnwindSafe for Stopwatch
impl Send for Stopwatch
impl Sync for Stopwatch
impl Unpin for Stopwatch
impl UnwindSafe for Stopwatch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ModelClone for T where
T: 'static + ReportableModel + Clone,
impl<T> ModelClone for T where
T: 'static + ReportableModel + Clone,
fn clone_box(&self) -> Box<dyn ReportableModel + 'static, Global>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more