anchor.diff:    Repeat
       Result := Lock.TryEnter;
       if Not Result then sleep(1);
  -  Until (Result) Or (GetTickCount64 > (tc + MaxWaitMilliseconds));
  +  Until (Result) Or (TPlatform.GetElapsedMilliseconds(tc)>MaxWaitMilliseconds);
     {$IFDEF HIGHLOG}
     if Not Result then begin
  -    tc2 := GetTickCount;
  +    tc2 := TPlatform.GetTickCount;
       if lockStartedTimestamp=0 then lockStartedTimestamp := Lock.StartedTimestamp;
       if lockStartedTimestamp=0 then tc3 := 0
       else tc3 := tc2-lockStartedTimestamp;
  
positive.code: 
  class function TPCThread.TryProtectEnterCriticalSection(const Sender: TObject;
    MaxWaitMilliseconds: Cardinal; var Lock: TPCCriticalSection): Boolean;
  Var tc : Cardinal;
    {$IFDEF HIGHLOG}
    tc2,tc3,lockCurrThread,lockWatingForCounter,lockStartedTimestamp : Cardinal;
    s : String;
    {$ENDIF}
  begin
    tc := GetTickCount64;
    if MaxWaitMilliseconds>60000 then MaxWaitMilliseconds := 60000;
    {$IFDEF HIGHLOG}
    lockWatingForCounter := Lock.WaitingForCounter;
  
negative.code: 
  Var _threads : TPCThreadList;
  
  
  
  constructor TPCThread.Create(CreateSuspended: Boolean);
  begin
    inherited Create(CreateSuspended);
  