summaryrefslogtreecommitdiff
path: root/Assembly_Firstpass/Steamworks/RTime32.cs
blob: 9a99665c8394fe0735dbb465189db619fa5ebd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;

namespace Steamworks;

[Serializable]
public struct RTime32 : IEquatable<RTime32>, IComparable<RTime32>
{
	public uint m_RTime32;

	public RTime32(uint value)
	{
		m_RTime32 = value;
	}

	public override string ToString()
	{
		return m_RTime32.ToString();
	}

	public override bool Equals(object other)
	{
		if (other is RTime32)
		{
			return this == (RTime32)other;
		}
		return false;
	}

	public override int GetHashCode()
	{
		return m_RTime32.GetHashCode();
	}

	public static bool operator ==(RTime32 x, RTime32 y)
	{
		return x.m_RTime32 == y.m_RTime32;
	}

	public static bool operator !=(RTime32 x, RTime32 y)
	{
		return !(x == y);
	}

	public static explicit operator RTime32(uint value)
	{
		return new RTime32(value);
	}

	public static explicit operator uint(RTime32 that)
	{
		return that.m_RTime32;
	}

	public bool Equals(RTime32 other)
	{
		return m_RTime32 == other.m_RTime32;
	}

	public int CompareTo(RTime32 other)
	{
		return m_RTime32.CompareTo(other.m_RTime32);
	}
}