For events, the API is identical for Python and C/C++. To post an event in the future, based on time, the SIM_time_post() and SIM_time_post_cycles() function is used. It has the following declaration:
void SIM_time_post(conf_object_t *obj, double seconds, sync_t sync, event_handler_t func, lang_void *user_data); void SIM_time_post_cycle(conf_object_t *obj, cycles_t cycles, sync_t sync, event_handler_t func, lang_void *user_data);
They take five arguments specifying the object whose time queue should be used (obj), the amount of time until the event occurs—in seconds or in cycles—(seconds), whether just the processor or the whole machine should be synchronized when the event occurs (sync), the callback function that should be called (func) and the parameter for the callback function (user_data).
If for some reason you do want to remove a posted but not yet handled event, you can cancel it with a call to SIM_time_clean(), specifying the object, callback function and parameter.
You can also check how long time is left until an event occurs using SIM_time_next_occurrence(), again specifying the object, callback function and parameter. The time left to the event is returned in cycles.
If you want to post an event a number of simulated steps into the future it should instead post to the step queue. Posting to the step queue is very similar to posting to the time queue, but the functions SIM_step_post(), SIM_step_clean() and SIM_step_next_occurrence() should be used instead.
Refer to the Simics Reference Manual for more information on the functions available and their parameters.