diff --git a/BitFaster.Caching.UnitTests/Lru/AfterAccessPolicyTests.cs b/BitFaster.Caching.UnitTests/Lru/AfterAccessPolicyTests.cs index b64fbc18..4679dc69 100644 --- a/BitFaster.Caching.UnitTests/Lru/AfterAccessPolicyTests.cs +++ b/BitFaster.Caching.UnitTests/Lru/AfterAccessPolicyTests.cs @@ -113,7 +113,12 @@ public async Task UpdateUpdatesTickCount() public void WhenItemIsExpiredShouldDiscardIsTrue() { var item = this.policy.CreateItem(1, 2); + +#if NETFRAMEWORK + item.TickCount = Stopwatch.GetTimestamp() - StopwatchTickConverter.ToTicks(TimeSpan.FromSeconds(11)); +#else item.TickCount = Environment.TickCount - (int)TimeSpan.FromSeconds(11).ToEnvTick64(); +#endif this.policy.ShouldDiscard(item).Should().BeTrue(); } diff --git a/BitFaster.Caching/IDiscreteTimePolicy.cs b/BitFaster.Caching/IDiscreteTimePolicy.cs index 68f53864..12454962 100644 --- a/BitFaster.Caching/IDiscreteTimePolicy.cs +++ b/BitFaster.Caching/IDiscreteTimePolicy.cs @@ -8,7 +8,7 @@ namespace BitFaster.Caching public interface IDiscreteTimePolicy { /// - /// Gets the time to live for an item in the cache. + /// Gets the time to expire for an item in the cache. /// /// The key of the item. /// If the key exists, the time to live for the item with the specified key.