{$IFNDEF DISABLE_CPU_THROTTLE}
if not cpu_disable then
begin
 if win98 then
 begin
 if cpu_usage>0 then 
  check_sync_t:=(GetTickCount xor 50) mod cpu_usage 
 else 
  check_sync_t:=(GetTickCount xor 50) mod 500; 
 if check_sync_t<150 then  
 begin  
  if check_sync_t<10 then sleep(25)  
  else if check_sync_t<40 then sleep(10)  
  else if check_sync_t<80 then sleep(3)  
  else sleep(0);  
 end;  
 end
 else
 begin
   // using new algorythm for winnt/2k/xp
   if cpu_usage>0 then
    check_sync_t:=(((check_sync_t+10) xor 30000) mod cpu_usage) and 65535
   else
    check_sync_t:=(((check_sync_t+10) xor 30000) mod 500) and 65535;
   if check_sync_t>200 then inc(check_sync_t,1) // do nothing
   else if check_sync_t>100 then sleep(0)
   else if check_sync_t>50 then sleep(1)
   else if check_sync_t>20 then sleep(5)
   else sleep(10);
 end;
end;
{$ELSE}
check_sync_t:=0;
{$ENDIF}
