|
|
@@ -14,9 +14,8 @@ namespace Discord.Net.WebSockets |
|
|
|
public sealed class KeepAlive : WebSocketMessage<ulong> |
|
|
|
{ |
|
|
|
public KeepAlive() : base(1, GetTimestamp()) { } |
|
|
|
private static DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); |
|
|
|
private static ulong GetTimestamp() |
|
|
|
=> (ulong)(DateTime.UtcNow - epoch).TotalMilliseconds; |
|
|
|
private static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); |
|
|
|
private static ulong GetTimestamp() => (ulong)(DateTime.UtcNow - epoch).TotalMilliseconds; |
|
|
|
} |
|
|
|
public sealed class Login : WebSocketMessage<Login.Data> |
|
|
|
{ |
|
|
|