Skip to main content

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

Supports Android, iOS, Windows platform.

Function Definition

void PostNetworkLatencyInSession(int latencyMs);

Input Parameters

ParameterTypeDescription
latencyMsintNetwork latency
Unit: millisecond

Code Sample

UnionAdapterAPI.GetReportService().PostNetworkLatencyInSession(50);