public ReadTime ( |
||
connection | ||
highPrecision | bool | |
return | double |
public double ReadTime(NetConnection connection, bool highPrecision)
{
double remoteTime = (highPrecision ? ReadDouble() : (double)ReadSingle());
if (connection == null)
throw new NetException("Cannot call ReadTime() on message without a connected sender (ie. unconnected messages)");
// lets bypass NetConnection.GetLocalTime for speed
return remoteTime - connection.m_remoteTimeOffset;
}