# SetNetworkLatency

## Description

Sets how often the network sends updates and checks for variable updates from other clients in milliseconds. The lower this value the more often this client will send and receive updates meaning shared variables are more likely to be up to date, but this will increase network traffic. In the case of connections across the internet this is particularly important as a large number of variables being updated frequently means that there may not be enough bandwidth. The default is 15 milliseconds which translates to roughly 67 updates every second to match closely a game frame rate of 60 fps. If you are updating a large number of variables over an internet connection it is recommended you increase this value towards 50 milliseconds resulting in 20 updates per second or further.

## Definition

SetNetworkLatency( iNetID, latency )

void agk::SetNetworkLatency( UINT iNetID, UINT latency )

## Parameters

- iNetID - The ID of the network to disconnect from.