1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +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

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