SL4B Examples: Latency

This page demonstrates how latency measurements are retrieved from Liberator for every update to Foreign Exchange.

Latency measurements can be enabled by using the enablelatency configuration option and setting the timestampfield configuration option to the field containing a millisecond timestamp, in this case dTimeStamp.

The SL4B_Accessor object contains a SL4B_Statistics object which enables one to retrieve, alongside latency with getLatency(), the following information:

The latency of each message is calculated using a field containing millisecond timestamp set by the server. The client then compares this to the current time. To account for the difference between the server clock and the client clock, the client automatically calculates the offset between the two clocks. This clock synchronisation, by default occurs every minute.

Please click here for more information on how this page has been configured.

Foreign Exchange

Currency Bid Ask TimeStamp Latency
EUR - - - -
GBP - - - -
JPY - - - -
CHF - - - -
AUD - - - -
ZAR - - - -