Board index » cppbuilder » Re: TTimer

Re: TTimer


2003-07-26 05:00:06 AM
cppbuilder46
Hi David,
that is right. Don't use more then 64 Timers...
Regards,
Mauro
"dvd8n" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
I seem to remember reading somewhere that resources for TTimers were
limited
by windows. Should I be limiting the number that I use in a project? I'm
at 6 at the moment.

Cheers, David


 
 

Re:Re: TTimer

Is that 64 per application or is there a system limit of 64?
David
"Mauro" < XXXX@XXXXX.COM >wrote in message
Quote
Hi David,

that is right. Don't use more then 64 Timers...

Regards,
Mauro

"dvd8n" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news: XXXX@XXXXX.COM ...
>I seem to remember reading somewhere that resources for TTimers were
limited
>by windows. Should I be limiting the number that I use in a project?
I'm
>at 6 at the moment.
>
>Cheers, David
>
>


 

Re:Re: TTimer

A limit per application.
Best regards,
Mauro
"dvd8n" < XXXX@XXXXX.COM >wrote:
Quote
Is that 64 per application or is there a system limit of 64?

David


"Mauro" < XXXX@XXXXX.COM >wrote in message
news:3f219a53$ XXXX@XXXXX.COM ...
>Hi David,
>
>that is right. Don't use more then 64 Timers...
>
>Regards,
>Mauro
>
>"dvd8n" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>news: XXXX@XXXXX.COM ...
>>I seem to remember reading somewhere that resources for TTimers were
>limited
>>by windows. Should I be limiting the number that I use in a project?
I'm
>>at 6 at the moment.
>>
>>Cheers, David
>>
>>
>
>


 

{smallsort}

Re:Re: TTimer

Does TTimer run in a seperate thread?
 

Re:Re: TTimer

"Maurice Anderson" < XXXX@XXXXX.COM >wrote in message
Quote
Does TTimer run in a seperate thread?
No. TTimer makes use of the API SetTimer(). WM_TIMER messages are sent to the
application by the OS at a given interval.
Ralph
 

Re:Re: TTimer

When using a timer, the timer does not seem to be available while the
program is in a closed loop. For example, while waiting for a switch to
close. For example,
the following does not allow the OnTimer method to be called:
while(nrLPT1->Pins[10] { }
Is there some other way to accomplish this?
Thanks!
 

Re:Re: TTimer

"Sparkman" < XXXX@XXXXX.COM >wrote in message
Quote
When using a timer, the timer does not seem to be available while the
program is in a closed loop.
Correct. TTimer uses Windows messaging for its notifications. While your
main thread is tied up no messages are processed.
Quote
while(nrLPT1->Pins[10] { }

Is there some other way to accomplish this?
Yes, you can call Application->ProcessMessages() in your loop. Though, a
better solution might be to offload the potentially lengthy operation into a
separate thread.
Clayton
 

Re:Re: TTimer

Thanks! Currently, the requirement is very short and the ProcessMessages()
should suffice. Threads are something that I haven't had much time to
explore.