tanjiajun_34 Grandmaster Cheater
Reputation: 0
Joined: 16 Feb 2006 Posts: 786 Location: Singapore
|
Posted: Thu Nov 20, 2008 12:09 am Post subject: Delphi Interval Question |
|
|
I have 2 timers.
First one at a speed of 1000 interval.
2nd one at a speed of 1 interval.
Timer2 is the first and and timer3 is the second.
| Code: |
procedure TForm1.Timer2Timer(Sender: TObject);
begin
lag:=lag+1;
Timer3.Enabled:=false;
Timer2.Enabled:=false;
Label1.Caption:=inttostr(lag);
end;
procedure TForm1.Timer3Timer(Sender: TObject);
begin
lag2:=lag2+1;
Label2.Caption:=inttostr(lag2);
end;
|
As you can see, I stop both Timers after the timer2 +1 to lag.
After this test, the caption of the label is....
Label1=1
Label2=63
But why? I thought my interval one is 1 and the other is 1000.
Why this and not this...
Label1=1
Label2=1000
I thought the second timer is x1000 faster?
|
|