Skip to content

Commit

Permalink
Merge pull request #5 from StrangeLoopGames/gzatravkin-patch-1
Browse files Browse the repository at this point in the history
Support_both_2023_and_2019
  • Loading branch information
gzatravkin authored May 14, 2024
2 parents 41b141e + d8ebdbd commit b1a98fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Runtime/NativeTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ internal class NativeTimeInternal
public static extern ulong GetTimestampNs();
#else
/// <summary> Fallback for unsupported platform </summary>
[GenerateTestsForBurstCompatibility]
#if UNITY_2022_OR_NEWER
[GenerateTestsForBurstCompatibility]
#else
[BurstCompatible]
#endif
public static ulong GetTimestampNs() { return 0; }
#endif
}

/// <summary>A burst compatible Stopwatch. Similar to <see cref="Stopwatch"/>.</summary>
#if UNITY_2022_OR_NEWER
[GenerateTestsForBurstCompatibility]
#else
[BurstCompatible]
#endif
public struct ValueStopwatch
{
public const ulong TicksToNanoseconds = 100;
Expand Down

0 comments on commit b1a98fa

Please sign in to comment.