Article View: borland.public.cppbuilder.nativeapi
Article #6969Re: multimedia timer
From: Michel Leunen
Date: Tue, 29 Mar 2005 16:31
Date: Tue, 29 Mar 2005 16:31
24 lines
1950 bytes
1950 bytes
Dominique MONTIN wrote: > I wish to use a timer that create periodic events at the frequency up to 1 > kHz. I don't know if it is possible. It seems that the timer available among > the component, with BCB, can just reach 18.2 Hz. > But I have seen that the resolution of the multimedia timer can reach 1 ms. > That let me some hope. > Does anybody has a simple example of using the multimedia timer ? Yes. Either use QueryPerformanceFrequency() and QueryPerformanceCounter() (see http://www.leunen.com/cbuilder/perfcount.html for a sample) or use a multimedia counter. I have a component that uses it. It comes with the source so you can see how it works (TMMTimer http://www.leunen.com/cbuilder/comps.html) Michel -- ---------------------------------------- Michel Leunen mailto: see my homepage. C++Builder, BCC5.5.1 Web site: http://www.leunen.com/ ----------------------------------------
Technical Details
Message-ID:
<424982c1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<424964e6$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bc8003398f0f44ab X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 29 Mar 2005 18:31:04 +0200 From: Michel Leunen <nospam@noreply.please> Organization: www.leunen.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: fr-be, en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: multimedia timer References: <424964e6$1@newsgroups.borland.com> In-Reply-To: <424964e6$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.241.142.231 Message-ID: <424982c1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1112113857 81.241.142.231 (29 Mar 2005 08:30:57 -0800) Lines: 24 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail