public bool AddOrUpdateToLater(TTimer timer, Moment time) { var timerSet = _timerSets[timer.GetHashCode() & _concurrencyLevelMask]; return(timerSet.AddOrUpdateToLater(timer, time)); }
public void AddOrUpdate(TTimer timer, Moment time) { var timerSet = _timerSets[timer.GetHashCode() & _concurrencyLevelMask]; timerSet.AddOrUpdate(timer, time); }
public static Task DelayAsync(this IMomentClock clock, Moment dueAt, CancellationToken cancellationToken = default) => clock.DelayAsync((dueAt - clock.Now).NonNegative(), cancellationToken);
public void Deconstruct(out T value, out Moment moment) { value = Value; moment = Moment; }
public Event(T value, Moment moment) { Value = value; Moment = moment; }
private long GetPriority(Moment time) { var priority = (time - _start).Ticks / Quanta.Ticks; return(Math.Max(minPriority, priority)); }