PostNetworkLatencyInSession [Player Network SDK Only]
[Player Network SDK Only] Performance data collection.
Reports network latency which directly reflects latency between game client and server.
note
It is recommended to call it in every frame callback. However, when considering the performance of low-end mobile phones, try to control the call when there are most frames per second. If the method of calling once every few frames is selected, there will be a situation where frames will be lost and the counted data will appear null, and the more the interval frames, the higher the risk.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows
platform.Supports
Android, iOS, Windows
platform.Function Definition
- Unity
- Unreal Engine
void PostNetworkLatencyInSession(int latencyMs);
static void PostNetworkLatencyInSession(int latency_ms);
Input Parameters
- Unity
- Unreal Engine
Parameter | Type | Description |
---|---|---|
latencyMs | int | Network latency Unit: millisecond |
Parameter | Type | Description |
---|---|---|
latency_ms | int32 | Network latency Unit: millisecond |
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetReportService().PostNetworkLatencyInSession(50);
GUA_NAMESPACE::GUAReportService::PostNetworkLatencyInSession(50);