コード例 #1
0
        public bool AddOrUpdateToLater(TTimer timer, Moment time)
        {
            var timerSet = _timerSets[timer.GetHashCode() & _concurrencyLevelMask];

            return(timerSet.AddOrUpdateToLater(timer, time));
        }
コード例 #2
0
        public void AddOrUpdate(TTimer timer, Moment time)
        {
            var timerSet = _timerSets[timer.GetHashCode() & _concurrencyLevelMask];

            timerSet.AddOrUpdate(timer, time);
        }
コード例 #3
0
ファイル: ClockEx.cs プロジェクト: masums/Stl.Fusion
 public static Task DelayAsync(this IMomentClock clock, Moment dueAt, CancellationToken cancellationToken = default)
 => clock.DelayAsync((dueAt - clock.Now).NonNegative(), cancellationToken);
コード例 #4
0
 public void Deconstruct(out T value, out Moment moment)
 {
     value  = Value;
     moment = Moment;
 }
コード例 #5
0
 public Event(T value, Moment moment)
 {
     Value  = value;
     Moment = moment;
 }
コード例 #6
0
ファイル: TimerSet.cs プロジェクト: tralivali1234/Stl.Fusion
        private long GetPriority(Moment time)
        {
            var priority = (time - _start).Ticks / Quanta.Ticks;

            return(Math.Max(minPriority, priority));
        }