You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
Re-added ReadTime()
This commit is contained in:
@@ -547,7 +547,19 @@ namespace Lidgren.Network
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the local time to a message; readable (and convertable to local time) by the remote host using ReadTime()
|
||||
/// Writes the current local time to a message; readable (and convertable to local time) by the remote host using ReadTime()
|
||||
/// </summary>
|
||||
public void WriteTime(bool highPrecision)
|
||||
{
|
||||
double localTime = NetTime.Now;
|
||||
if (highPrecision)
|
||||
Write(localTime);
|
||||
else
|
||||
Write((float)localTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a local timestamp to a message; readable (and convertable to local time) by the remote host using ReadTime()
|
||||
/// </summary>
|
||||
public void WriteTime(double localTime, bool highPrecision)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user