anchor.diff:  %% @doc Simulate clients viewing advertisements.
   simulate(#state{client_list=ClientList, num_events=NumEvents}=State) ->
       %% Start the simulation.
  -    Viewer = fun(_) ->
  -            Random = random:uniform(length(ClientList)),
  -
  -            timer:sleep(10),
  -
  -            Pid = lists:nth(Random, ClientList),
  -            Pid ! {runner, view_ad}
  -    end,
  -    lists:foreach(Viewer, lists:seq(1, NumEvents)),
  +    spawn(fun() ->
  +                Viewer = fun(EventId) ->
  +                        spawn(fun() ->
  +                                   random:seed(erlang:phash2([node()]),
  +                                               erlang:monotonic_time(),
  +                                               erlang:unique_integer()),
  +                                    Random = random:uniform(length(ClientList)),
  +                                    MSeconds = random:uniform(10),
  +                                    timer:sleep(MSeconds),
  +                                    Pid = lists:nth(Random, ClientList),
  +                                    Pid ! {runner, view_ad},
  +                                    lager:info("Event ~p dispatched for ~p milliseconds!", [EventId, MSeconds])
  +                              end)
  +                end,
  +                lists:foreach(Viewer, lists:seq(1, NumEvents)),
  +                lager:info("Simulation event generation complete!")
  +          end),
       {ok, State}.
   
   %% @doc Summarize results.
  -summarize(#state{num_clients=_NumClients, ad_list=AdList}=State) ->
  +summarize(#state{ad_list=AdList}=State) ->
       %% Wait until all advertisements have been exhausted before stopping
       %% execution of the test.
       Overcounts = lists:map(fun(#ad{counter=CounterId}) ->
  
positive.code: %% @doc Wait for all events to be delivered in the system.
  wait(#state{count_events=Count, num_events=NumEvents}=State) ->
      receive
          {runner, view_ad} ->
              case Count >= NumEvents of
                  true ->
                      {ok, State};
                  false ->
                      wait(State#state{count_events=Count + 1})
              end
      end.
  
negative.code:             end,
  
              %% Notify the harness that an event has been processed.
              Runner ! {runner, view_ad_complete},
  
              client(SetType, CounterType, SyncInterval, Runner, Id, AdsWithContractsId, AdsWithContracts0, Counters);
          {runner, terminate} ->
              Runner ! {runner, terminate_done},
              ok
      after
          SyncInterval ->
              {ok, AdsWithContracts, Counters} = synchronize(SetType, AdsWithContractsId, AdsWithContracts0, Counters0),
  