export default function run(simulation) {
  while (
    simulation.getState().currentEventIndex <
    simulation.getState().timeline.length
  ) {
    const currentEventIndex = simulation.getState().currentEventIndex;
    const timeline = simulation.getState().timeline;
    const currentEvent = timeline[currentEventIndex];
    simulation.dispatch(currentEvent);
    simulation.dispatch({ type: 'LOG_ACTOR_HISTORIES' });
    simulation.dispatch({ type: 'INCREMENT_CURRENT_EVENT_INDEX' });
  }
}

export default function run(simulation) {
  while (
    simulation.getState().currentEventIndex <
    simulation.getState().timeline.length
  ) {
    const currentEventIndex = simulation.getState().currentEventIndex;
    const timeline = simulation.getState().timeline;
    const currentEvent = timeline[currentEventIndex];
    const currentTime = currentEvent.time;
    const logEvent = { type: 'LOG_ACTOR_HISTORIES', time: currentTime };
    const incrementEventIndexEvent = {
      type: 'INCREMENT_CURRENT_EVENT_INDEX', time: currentTime,
    };
    simulation.dispatch(currentEvent);
    simulation.dispatch(logEvent);
    simulation.dispatch(incrementEventIndexEvent);
  }
}

Add time to log-actor & increment-index events
Add time to log-actor & increment-index events
