function CEL_OnLineTimeChanged(Source, EventID, time, varargin)

global m_CEL;
global m_OrderID;

try
    % Cancelling order if it wasn't filled within 10 seconds.
    if ~strcmp(m_OrderID, '')
        order = m_CEL.Orders.ItemByGuid(m_OrderID);
        if (etime(datevec(time), datevec(order.get('ServerTimestamp'))) >= 10)
            if strcmp(order.get('GWStatus'), 'osInOrderBook')
                order.Cancel;
                disp (['Canceling the order with ''', m_OrderID, ''' GUID.']);
            end
        end
    end
catch
    CEL_ShutDown;
    disp('An error occurred in CEL_OnLineTimeChanged.m file.');
end