[][src]Trait boomerang::Sched

pub trait Sched: Sized + Debug {
    type Value;
    fn get_elapsed_logical_time(&self) -> Duration;
fn get_logical_time(&self) -> Instant;
fn get_physical_time(&self) -> Instant;
fn stop(&mut self);
fn schedule(
        &mut self,
        trigger: Rc<Trigger<Self>>,
        extra_delay: Duration,
        value: Option<Self::Value>
    ); fn print_snapshot(&self) { ... } }

Associated Types

type Value

EventValue type

Loading content...

Required methods

fn get_elapsed_logical_time(&self) -> Duration

Return the elpased logical time in nanoseconds since the start of execution.

fn get_logical_time(&self) -> Instant

Return the current logical time in nanoseconds since January 1, 1970.

fn get_physical_time(&self) -> Instant

Return the current physical time in nanoseconds since January 1, 1970.

fn stop(&mut self)

Function to request stopping execution at the end of the current logical time.

fn schedule(
    &mut self,
    trigger: Rc<Trigger<Self>>,
    extra_delay: Duration,
    value: Option<Self::Value>
)

Schedule the specified trigger at current_time plus the offset of the specified trigger plus the delay. The value is required to be a pointer returned by malloc because it will be freed after having been delivered to all relevant destinations unless it is NULL, in which case it will be ignored. If the trigger offset plus the extra delay is greater than zero and stop has been requested, then ignore this and return 0. Also, if the trigger argument is null, ignore and return 0. Otherwise, return a handle to the scheduled trigger, which is an integer greater than 0.

Loading content...

Provided methods

fn print_snapshot(&self)

Return the elapsed physical time. Print a snapshot of the priority queues used during execution.

Loading content...

Implementors

impl<V> Sched for Scheduler<V> where
    V: EventValue
[src]

type Value = V

Loading content...