pub fn event_post_step<F>(
clock: *mut ConfObject,
event: *mut EventClass,
obj: *mut ConfObject,
steps: PcStep,
callback: F,
) -> Result<()>
Expand description
An event of evclass for object obj is posted on clock to occur at a given point in the future. The user_data will be associated with the event. The clock is the object that should be used for keeping track of time for the event. It can be a processor or an instance of the clock class.
If a configuration class was specified when evclass was registered, then obj must be an instance of that class.
The expiration point can be specified in seconds, cycles or steps by using the appropriate call, and these values are relative to the current state. Events that need to run synchronized (Sim_EC_Machine_Sync) can only be posted in seconds or cycles, not steps, since synchronization can only be perform in virtual time.
Note: Events posted with SIM_event_post_cycle are posted at a certain point in time based on the clock’s current frequency, not at a certain clock cycle. The difference is significant if the frequency of the clock object can change dynamically.
§Arguments
clock
- The clock whose time this event is being posted forevent
- The event class registered withregister_event
being postedobj
- The object the event is being posted onsteps
- The number of seconds until this event expirescallback
- Callback to run for this event
§Context
Cell Context