Skip to content

Commit 18b5cd9

Browse files
committed
Fix TickCount64
1 parent 5f8d738 commit 18b5cd9

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
// ReSharper disable once CheckNamespace
1+
using System.Runtime.InteropServices;
2+
3+
// ReSharper disable once CheckNamespace
24
namespace System;
35

46
public static class EnvironmentExtensions
57
{
68
extension(Environment)
79
{
8-
public static long TickCount64 => Environment.TickCount;
10+
public static long TickCount64 => unchecked((long) GetTickCount64());
911
}
12+
13+
[DllImport("kernel32.dll")]
14+
private static extern ulong GetTickCount64();
1015
}

0 commit comments

Comments
 (0)