File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
BitFaster.Caching.UnitTests/Lru Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,12 @@ public async Task UpdateUpdatesTickCount()
113113 public void WhenItemIsExpiredShouldDiscardIsTrue ( )
114114 {
115115 var item = this . policy . CreateItem ( 1 , 2 ) ;
116+
117+ #if NETFRAMEWORK
118+ item . TickCount = Stopwatch . GetTimestamp ( ) - StopwatchTickConverter . ToTicks ( TimeSpan . FromSeconds ( 11 ) ) ;
119+ #else
116120 item . TickCount = Environment . TickCount - ( int ) TimeSpan . FromSeconds ( 11 ) . ToEnvTick64 ( ) ;
121+ #endif
117122
118123 this . policy . ShouldDiscard ( item ) . Should ( ) . BeTrue ( ) ;
119124 }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace BitFaster.Caching
88 public interface IDiscreteTimePolicy
99 {
1010 /// <summary>
11- /// Gets the time to live for an item in the cache.
11+ /// Gets the time to expire for an item in the cache.
1212 /// </summary>
1313 /// <param name="key">The key of the item.</param>
1414 /// <param name="timeToExpire">If the key exists, the time to live for the item with the specified key.</param>
You can’t perform that action at this time.
0 commit comments