When OnixS::FIX::ISessionListener::onInboundApplicationMsg or OnixS::FIX::ISessionListener::onInboundSessionMsg is called the T2 timestamp is called and the counter is analyzed.
If it is 1 then the inbound latency is equal to T2-T1. If it is greater than 1 it means that there was TCP fragmentation so the latency cannot be calculated properly. If it is 0 it means that more than one FIX messages were received in one IP package and the latency cannot be calculated properly. In any case the counter should be set back to 0. Please also take the look at the "Latency" sample from our distribution package.
Executing the Order on the exchange side (T2).
Therefore, the clear Tick-To-Trade latency = T2 - T1. However, on the client side, you cannot get T2 and T1 properly. You can get only the timestamp when you receive the Market Data (OnixS::FIX::ISessionListener::onInboundApplicationMsg) and the timestamp when you send the Order (OnixS::FIX::ISessionListener::onMessageSending).
You use a non-standard (non-system) GCC version. We are using the Red Hat Developer Toolset for builds with non-standard GCC versions on CentOS. We highly recommend using DTS as a modern and easy-to-use way, which does not affect the system GCC version and tools. DTS compiler uses the old ABI, but if your compiler is configured with new ABI, then to resolve the issue you need to add the
D_GLIBCXX_USE_CXX11_ABI=0 flag to your build system. However, it would be easier just to use the DTS compiler, e.g. DTS8 is used for builds with GCC version 8.3.x.