Files
Ragon/Ragon.Client/Sources/Handler/TimestampHandler.cs
T

21 lines
470 B
C#
Raw Normal View History

2023-10-04 14:42:59 +03:00
using Ragon.Protocol;
namespace Ragon.Client;
public class TimestampHandler: IHandler
{
private readonly RagonClient _client;
public TimestampHandler(RagonClient client)
{
_client = client;
}
2024-09-28 20:11:56 +03:00
public void Handle(RagonStream buffer)
2023-10-04 14:42:59 +03:00
{
2024-09-28 20:11:56 +03:00
var timestamp0 = (uint)buffer.ReadInt();
var timestamp1 = (uint)buffer.ReadInt();
2023-10-04 14:42:59 +03:00
var value = new DoubleToUInt { Int0 = timestamp0, Int1 = timestamp1 };
_client.SetTimestamp(value.Double);
}
}