function [egoTimeDiff,pedestrianTimeDiff] = helperComputeArrivalTimeDiffEntrytime(egoNewSpeed,time,egoData)
%   This script computes modifications because of the ego actor's new speed in terms of EntryTime

%   This is a helper script for example purposes and may be
%   modified in the future.

%   Copyright 2021 The MathWorks, Inc.

egoTimeDiff = 0;
pedestrianTimeDiff = 0;
EgoOldSpeed =  egoData.speed;
EgoNewTime = (EgoOldSpeed*time)/egoNewSpeed;
if time < EgoNewTime
    pedestrianTimeDiff = EgoNewTime - time;
elseif EgoNewTime < time
    egoTimeDiff = time - EgoNewTime;
end
end