Skip to content

Commit d8ebdbd

Browse files
authored
Support_both_2023_and_2019
1 parent 41b141e commit d8ebdbd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Runtime/NativeTime.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ internal class NativeTimeInternal
1111
public static extern ulong GetTimestampNs();
1212
#else
1313
/// <summary> Fallback for unsupported platform </summary>
14-
[GenerateTestsForBurstCompatibility]
14+
#if UNITY_2022_OR_NEWER
15+
[GenerateTestsForBurstCompatibility]
16+
#else
17+
[BurstCompatible]
18+
#endif
1519
public static ulong GetTimestampNs() { return 0; }
1620
#endif
1721
}
1822

1923
/// <summary>A burst compatible Stopwatch. Similar to <see cref="Stopwatch"/>.</summary>
24+
#if UNITY_2022_OR_NEWER
2025
[GenerateTestsForBurstCompatibility]
26+
#else
27+
[BurstCompatible]
28+
#endif
2129
public struct ValueStopwatch
2230
{
2331
public const ulong TicksToNanoseconds = 100;

0 commit comments

Comments
 (0)