2020-03-17 19:14:01 +00:00
|
|
|
|
using System;
|
2022-01-03 05:35:59 +00:00
|
|
|
|
using static System.Buffers.Binary.BinaryPrimitives;
|
2020-03-17 19:14:01 +00:00
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
public sealed class RTC3
|
|
|
|
|
{
|
|
|
|
|
public readonly byte[] Data;
|
|
|
|
|
public const int Size = 8;
|
|
|
|
|
|
|
|
|
|
public RTC3(byte[] data) => Data = data;
|
|
|
|
|
|
2022-01-03 05:35:59 +00:00
|
|
|
|
public int Day { get => ReadUInt16LittleEndian(Data.AsSpan(0x00)); set => WriteUInt16LittleEndian(Data.AsSpan(0x00), (ushort)value); }
|
2020-03-17 19:14:01 +00:00
|
|
|
|
public int Hour { get => Data[2]; set => Data[2] = (byte)value; }
|
|
|
|
|
public int Minute { get => Data[3]; set => Data[3] = (byte)value; }
|
|
|
|
|
public int Second { get => Data[4]; set => Data[4] = (byte)value; }
|
|
|
|
|
}
|
2022-01-03 05:35:59 +00:00
|
|
|
|
}
|