with Events; with Virtual_Times; use Virtual_Times; -- for type Time with Ada.Text_IO; use Ada.Text_IO; package Simulator is Simulation_Done : exception; -- raise this to terminate the simulation early procedure Run (Latest_Stop_Time : Time); -- call this after queuing up initial events, like task starts procedure Schedule_Event (E : in out Events.Object'Class); -- inserts E in the event queue -- at the associated time procedure Cancel_Event (E : in out Events.Object'Class); -- removes E from the event queue; -- you want to do this whenever you change the associated time procedure Set_Every_Clock_Event (E : in out Events.Object'Class); -- can arrange for one event to be triggered every time -- that the simulated time advances procedure Stop; -- will stop the simulation, before Stop_Time. function Current_Time return Time; procedure Show_Event_Queue (F : File_Type; Long : Boolean := False); -- print out event queue contents end Simulator;