1
0
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:
lidgren
2012-04-03 07:26:30 +00:00
parent 0a0e319f21
commit 271675a8ea
4 changed files with 36 additions and 2 deletions

View File

@@ -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)
{