Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Delphi Interval Question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Thu Nov 20, 2008 12:09 am    Post subject: Delphi Interval Question Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites