Thread trop lent : 200ms !
Bonjour,
Le temps d'échange entre mon application et mon thread est de plus de 200ms !!!
Je m'explique:
Voici ce que j'ai dans ma boucle execute (j'ai simplifié au maximum) :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Procedure TMyThread.Execute;
Begin
repeat
if (StepRun = STEP_IDLE) then
Begin
End;
if (StepRun = STEP_REQUEST) then
Begin
DataReady := true;
StepRun := STEP_IDLE;
end;
until Terminated;
End; |
et voilà ce j'ai dans ma fiche principale:
Code:
1 2 3 4 5 6 7
|
DataReady:=false;
StepRun := STEP_REQUEST;
StartTime := GetTickCount;
Repeat
Until DataReady;
TempsEcoule := GetTickCount-StartTime; |
J'ai essayé d'autres priorités mais c'est pire ou alors l'application devient inexploitable par sa lenteur d'affichage.
Y-a-t-il une explication à cela ???
merci de votre aide.
Franck