anchor.diff:  var OwnEvent: TWEvent;
       FiredEvents: TBooleanArray;
       fired: integer;
  -    ticks: DWORD;
  +    ticks: Int64;
       Len: integer;
       VTimeout: Int64;
   
  
positive.code: end;
  {$ENDIF}
  
  {$IFDEF UNIX}
  function sched_getaffinity(pid: PtrUInt; cpusetsize: LongInt; cpuset: Pointer): LongInt; cdecl; external;
  function sched_setaffinity(pid: PtrUInt; cpusetsize: LongInt; cpuset: Pointer): LongInt; cdecl; external;
  
negative.code:         OwnEvent := TWEvent.Create(nil, false, false, 'OwnerEvent');
          SetParents(OwnEvent);
          if VTimeout <> INFINITE then begin
              ticks := WGetTickCount;
          end;
          while ((fired <> Len) and WaitAll) or ((fired = 0) and (not WaitAll)) do begin
              Result := OwnEvent.WaitFor(VTimeout);
              fired := GetFiredCount;
              if VTimeout <> INFINITE then begin
                  VTimeout := VTimeout - (WGetTickCount - ticks);
                  ticks := WGetTickCount;
                  if (VTimeout <= 0) then begin
                      break;
                  end;
  