Documentation Center

  • Trial Software
  • Product Updates


Package: sedb

Current time in discrete-event simulation


t = simtime


t = simtime, at the SimEvents® debugger command prompt, returns the current simulation time.


Set a breakpoint to advance the simulation by 2 s from the current time:

  1. Begin a debugger session for a particular model. At the MATLAB® command prompt, enter:

  2. Use the current time to set a breakpoint. At the sedebug>> prompt, enter:

    t = simtime;

    The following output confirms the setting of the breakpoint:

    Set b1 : Breakpoint for first operation at or after time 2
  3. Run the simulation until the breakpoint:


    The output describes simulation behavior and then confirms that the debugger has reached the breakpoint. Here is an excerpt:

    Hit b1 : Breakpoint for first operation at or after time 2
    Executing EntityGeneration Event (ev3)                Time = 2.000000000000000
    : Entity = <none>                                     Priority = 1
    : Block  = Time-Based Entity Generator
  4. End the debugger session. At the sedebug>> prompt, enter:

Was this topic helpful?