1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-15 14:54:09 +02:00

Make Stopwatch work in comptime

This commit is contained in:
Brian Fiete 2024-03-23 11:15:22 -04:00
parent 6a7bcb4ef9
commit 8149d0892b

View file

@ -112,9 +112,16 @@ namespace System.Diagnostics
} }
public static int64 GetTimestamp() public static int64 GetTimestamp()
{
if (Compiler.IsComptime)
{
return (.)Platform.BfpSystem_GetTimeStamp() / 10;
}
else
{ {
return Internal.GetTickCountMicro(); return Internal.GetTickCountMicro();
} }
}
// Get the elapsed ticks. // Get the elapsed ticks.
private int64 GetRawElapsedTicks() private int64 GetRawElapsedTicks()