public override void ProgressInTime(GameTime hour) { base.ProgressInTime(hour); if (IsExpired) { OnExpire?.Invoke(); } }
public CacheCallInfo(int expiresTimeoutSeconds, OnExpire onExpire) { Timer tm = null; tm = new Timer(delegate(object state) { onExpire(this); tm.Dispose(); }, null, expiresTimeoutSeconds * 1000, 0); }
public Todo(bool isExpirable, bool isInternal, GameTime expiryTimestamp) { IsExpirable = isExpirable; IsInternal = isInternal; ExpiryTimestamp = expiryTimestamp; if (ExpiryTimestamp <= CreatedAt) { OnExpire?.Invoke(); } }
public void Expire() => OnExpire?.Invoke(this);
protected void FireOnExpire() { Core.Log.LibVerbose("On Expire timer for key: {0}", Key); OnExpire?.Invoke(this, EventArgs.Empty); }