The SimConnect_RequestResponseTimes function is used to provide some data on the performance of the client-server connection.


HRESULT SimConnect_RequestResponseTimes(
    HANDLE  hSimConnect,
    DWORD  nCount,
    float*  fElapsedSeconds


Parameter Description Type
hSimConnect Handle to a SimConnect object. Integer
nCount Integer containing the number of elements in the array of floats. This should be set to five for the full range of timings, but can be less if only the first few are of interest. There is no point creating an array of greater than five floats. Integer

An array of nCount floats, containing the times. The five elements will contain the following:

0 - total round trip time

1 - time from the request till the packet is sent

2 - time from the request till the packet is received by the server

3 - time from the request till the response is made by the server

4 - time from the server response to the client receives the packet.



Return Values

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return value Description
S_OK The function succeeded.
E_FAIL The function failed.


int quit = 0;
bool fTesting = true;
while( quit == 0 )
    hr = SimConnect_CallDispatch(hSimConnect, MyDispatchProc, NULL);
    if (fTesting)
        fTesting = false;
        float fElapsedSeconds[5];
        hr = SimConnect_RequestResponseTimes(hSimConnect, 5, &fElapsedSeconds[0]);



This function should not be used as part of a final application, as it is costly in performance, but is available to help provide some performance data that can be used while building an testing a client application.


See Also