﻿using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;

namespace LiteNetLibManager
{
    public struct ServerTimeMessage : INetSerializable
    {
        public int serverUnixTime;
        public float serverTime;

        public void Deserialize(NetDataReader reader)
        {
            serverUnixTime = reader.GetInt();
            serverTime = reader.GetFloat();
        }

        public void Serialize(NetDataWriter writer)
        {
            writer.Put(serverUnixTime);
            writer.Put(serverTime);
        }
    }
}

﻿using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;

namespace LiteNetLibManager
{
    public struct ServerTimeMessage : INetSerializable
    {
        public int serverUnixTime;

        public void Deserialize(NetDataReader reader)
        {
            serverUnixTime = reader.GetPackedInt();
        }

        public void Serialize(NetDataWriter writer)
        {
            writer.PutPackedInt(serverUnixTime);
        }
    }
}

Reduce packet size, remove bloated time codes
Reduce packet size, remove bloated time codes
