🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14956

Re: Does TTimer interval including Processing Time?

#14956
From: Jonathan Arnold
Date: Wed, 23 Jul 2003 16:26
29 lines
2689 bytes
>>If that's not the case, i.e. as long as the processing time less than the
>>interval I can rely on the timer(?)
> Depends on how you are invoking the timer. If you are using a WM_TIMER
> message (SetTimer), then it is just pulled out of your windows application
> message queue like any other message. It won't be processed until your
> message loop runs. If your program is busy doing something else when

It's even worst than that - not only will the WM_TIMER message not be
dealt with until the message queue is processed, it won't be processed
until the message queue is *empty*. It is really just a flag that the
message queue processor in Windows checks for when there are no more
messages on an application's queue. If it is set, the processor sends
your app the WM_TIMER message.

> If you are worried about accuracy (and it sounds like you are), you need to
> use the multi-media timer functions (see timeSetEvent) and use a callback

You can also use a component to do this. Just drop it on your format, and
set the event handler. There are a few out there, but I recommend the
shareware ZieglerCollection, which includes this, buttons, app events, and
a whole bunch more:

http://www.zieglersoft.com

-- 
Jonathan Arnold         C/C++/CBuilder Keen Advice:
http://www.keen.com/categories/categorylist_expand.asp?sid=5156620
    Comprehensive C++Builder link site:
http://www.buddydog.org/C++Builder/c++builder.html
Technical Details
Message-ID: <3f1eb723$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <oprsqp0tqnbq7az6@newsgroups.borland.com> <3f1e10fb$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,354c421bf944414a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-23 09:40:52 PST
Date: Wed, 23 Jul 2003 12:26:12 -0400
From: Jonathan Arnold <jdarnold@buddydog.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4; MultiZilla v1.4.0.4A) Gecko/20030624
X-Accept-Language: en-us, en, ja
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Does TTimer interval including Processing Time?
References: <oprsqp0tqnbq7az6@newsgroups.borland.com> <3f1e10fb$1@newsgroups.borland.com>
In-Reply-To: <3f1e10fb$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 66.92.76.225
Message-ID: <3f1eb723$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058977571 66.92.76.225 (23 Jul 2003 09:26:11 -0700)
Lines: 30
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail