scripts
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine
|
||||
{
|
||||
// Token: 0x0200046E RID: 1134
|
||||
internal class SystemClock
|
||||
{
|
||||
// Token: 0x17000D20 RID: 3360
|
||||
// (get) Token: 0x0600393D RID: 14653 RVA: 0x000636BC File Offset: 0x000618BC
|
||||
public static DateTime now
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600393E RID: 14654 RVA: 0x000636D8 File Offset: 0x000618D8
|
||||
public static long ToUnixTimeMilliseconds(DateTime date)
|
||||
{
|
||||
return Convert.ToInt64((date.ToUniversalTime() - SystemClock.s_Epoch).TotalMilliseconds);
|
||||
}
|
||||
|
||||
// Token: 0x0600393F RID: 14655 RVA: 0x0006370C File Offset: 0x0006190C
|
||||
public static long ToUnixTimeSeconds(DateTime date)
|
||||
{
|
||||
return Convert.ToInt64((date.ToUniversalTime() - SystemClock.s_Epoch).TotalSeconds);
|
||||
}
|
||||
|
||||
// Token: 0x04001151 RID: 4433
|
||||
private static readonly DateTime s_Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user