Skip to content

Commit cf60dee

Browse files
author
Alex Peck
committed
tp
1 parent 2481186 commit cf60dee

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

BitFaster.Caching.Benchmarks/TimeBenchmarks.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
namespace BitFaster.Caching.Benchmarks
88
{
9-
#if Windows
10-
[DisassemblyDiagnoser(printSource: true, maxDepth: 5)]
11-
[SimpleJob(RuntimeMoniker.Net48)]
12-
#endif
13-
[SimpleJob(RuntimeMoniker.Net60)]
9+
//#if Windows
10+
// [DisassemblyDiagnoser(printSource: true, maxDepth: 5)]
11+
// [SimpleJob(RuntimeMoniker.Net48)]
12+
//#endif
13+
[SimpleJob(RuntimeMoniker.Net90)]
1414
[HideColumns("Job", "Median", "RatioSD", "Alloc Ratio")]
1515
public class TimeBenchmarks
1616
{
@@ -71,6 +71,16 @@ public Duration DurationSinceEpoch()
7171
{
7272
return Duration.SinceEpoch();
7373
}
74+
75+
[Benchmark()]
76+
public long SystemTimeProvider()
77+
{
78+
#if NET9_0_OR_GREATER
79+
return TimeProvider.System.GetTimestamp();
80+
#else
81+
return 0;
82+
#endif
83+
}
7484
}
7585

7686
public static class TickCount64

0 commit comments

Comments
 (0)