SupaLidlGame/Utils/CacheItem.cs

14 lines
244 B
C#
Raw Normal View History

2023-08-03 16:17:34 -07:00
using Godot;
public class CacheItem<T>
{
public ulong TimeToLiveTimestamp { get; set; }
public T Value { get; set; }
public bool HasExpired(ulong ttl)
{
return Time.GetTicksMsec() > TimeToLiveTimestamp + ttl;
}
}