Paul wrote:
>> There may be multi-media APIs with better accuracy.
> I'll check this.
This works nicely with a minimum resolution of 1 ms in XP. The
first call of timeSetEvent() however takes a while (5-7 ms on
on my system) since a thread is created first.
--
Arno Garrels
--
To unsubscr
Hello Paul,
What about the assembler pause opcode? I think it is introduced starting
pentium 4. You could do the delay loop in asm and insert pause's to
decrease the cpu load.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Tuesday, January 2
Hi Wilfried ,
> But if you use PostMessage to same thread context. and IN your custom
> message handler you do your next operation, then you have a very small
> delay without hanging up the message pump for this thread.
This is a delay of max a few microseconds and it is working this way
alread
Hello Paul,
> I think tou mean "sending a message" here to block the program flow a while.
Not exacly. If you use SendMessage to a message pump for a window
created in the same thread contextt then it is just a function call. If
other thread context then it will block until the thread has timesli
Hi Wilfried,
> You could do very small delays by posting a message to a custom message
> handler. You cannot measure the delay, but it is not depending the
> timeslice like with the other delay's or a TTimer.
I think tou mean "sending a message" here to block the program flow a while.
I use a qu
Is it true that under Linux one could specify delays in microsecs
instead of millisecs for Windows??
On Tue, Jan 27, 2009 at 1:38 PM, Paul wrote:
> Hi Angus,
>
>> You can implement a blocking 2ms delay using QueryPerformanceCounter
>> which returns a 64-bit counter, and QueryPerformanceFrequency
Hi Angus,
> You can implement a blocking 2ms delay using QueryPerformanceCounter
> which returns a 64-bit counter, and QueryPerformanceFrequency which gives
> you ticks per second for the counter.
I know, but since there are a lot of very short instructions to send, this
increases the cpu load a
> I want to implement a 2 ms delay between each command on a very
> high connection speed.
You can implement a blocking 2ms delay using QueryPerformanceCounter
which returns a 64-bit counter, and QueryPerformanceFrequency which gives
you ticks per second for the counter.
But another process ma
Hello Paul,
You could do very small delays by posting a message to a custom message
handler. You cannot measure the delay, but it is not depending the
timeslice like with the other delay's or a TTimer.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestda