anchor.diff:  begin
     for i := Low(Self) to high(Self) do
       self[i](sender, args);
  +end;
  +
  +{%endregion}
  +
  +{%region TThrottledEvent }
  +
  +constructor TThrottledEvent.Create(Owner:TComponent);
  +begin
  +  Inherited Create(Owner);
  +  FTimer := TTimer.Create(Self);
  +  FTimer.Interval := CT_DEFAULT_DELAYEDREFRESH_MS;
  +  FTimer.OnTimer := OnTimer;
  +  FTimer.Enabled := false;
  +  FSuppressedInvocations:=0;
  +  FLastClientNotify := MinDateTime;
  +  FLastActualNotify := MinDateTime;
  +  FMode:=temNone;
  +end;
  +
  +procedure TThrottledEvent.Add(AListener : TNotifyEvent);
  +begin
  +  FHandler.Add(AListener);
  +end;
  +
  +procedure TThrottledEvent.Remove(AListener : TNotifyEvent);
  +begin
  +  FHandler.Remove(AListener);
  +end;
  +
  +procedure TThrottledEvent.Notify;
  +var LIdleDuration : TTimeSpan;
  +begin
  +  FLastClientNotify:=Now;
  +  LIdleDuration := TTimeSpan.Subtract(Now, FLastActualNotify);
  +  if (FMode = temNone) OR ((NOT FTimer.Enabled) AND (LIdleDuration > Interval)) then
  +    NotifyNow
  +  else
  +    NotifyLater;
  +end;
  +
  +procedure TThrottledEvent.NotifyNow;
  +begin
  +  FTimer.Enabled := false;
  +  FLastActualNotify:=Now;
  +  FHandler.Invoke(nil);
  +  FSuppressedInvocations:=0;
  +end;
  +
  +procedure TThrottledEvent.NotifyLater;
  +begin
  +  inc(FSuppressedInvocations);
  +  if NOT FTimer.Enabled then
  +    FTimer.Enabled:=true;
  +end;
  +
  +procedure TThrottledEvent.OnTimer(Sender: TObject);
  +var LDuration : TTimeSpan;
  +begin
  +  case FMode of
  +    temNone: NotifyNow;
  +    temNotifyEveryInterval: begin
  +      LDuration := TTimeSpan.Subtract(Now, FLastActualNotify);
  +      if LDuration > Interval then
  +        NotifyNow;
  +    end;
  +    temNotifyOnEventBurstFinished: begin
  +      LDuration := TTimeSpan.Subtract(Now, FLastClientNotify);
  +      if LDuration > Interval then
  +        NotifyNow;
  +    end;
  +  end;
  +end;
  +
  +procedure TThrottledEvent.SetInterval(const ATimeSpan : TTimeSpan);
  +begin
  +  if ATimeSpan.TotalMilliseconds = 0 then
  +    raise EArgumentOutOfRangeException.Create('ATimeSpan was 0');
  +
  +  FTimer.Interval := round( abs( ATimeSpan.TotalMilliseconds ) );
  +end;
  +
  +function TThrottledEvent.GetInterval : TTimeSpan;
  +begin
  + Result := TTimeSpan.FromMilliseconds( FTimer.Interval );
   end;
   
   {%endregion}
  
positive.code:   MaxSeconds = MaxMilliseconds div 60;
    MinSeconds = MinMilliseconds div 60;
  
  
  { GLOBAL FUNCTIONS }
  
  { Converts a string to hexidecimal format }
  function String2Hex(const Buffer: AnsiString): AnsiString;
  function Buffer2Hex(const ABuffer: TBytes) : AnsiString;
  
  { Binary-safe StrComp replacement. StrComp will return 0 for when str1 and str2 both start with NUL character. }
  function BinStrComp(const Str1, Str2 : AnsiString): Integer;
  function BufferCompare(const ABytes1, ABytes2: TBytes): integer;
  
  { Ternary operator equivalent of predicate ? (true-val) : (false-value) }
  function IIF(const ACondition: Boolean; const ATrueResult, AFalseResult: Cardinal): Cardinal; overload;
  
negative.code: 
  uses
    Classes, SysUtils, Generics.Collections, Generics.Defaults,
    Variants, LazUTF8, math, typinfo, UMemory, ExtCtrls;
  
  { CONSTANTS }
  
  