DELAY PROCESS(ProcNum;1) seems to delay 2 to 4 ticks

Jack Des Bouillons (4/7/14 10:00AM)
Tony Ringsmuth (4/7/14 12:14PM)
Arnaud de Montard (4/7/14 6:37PM)
Keisuke Miyako (4/8/14 12:50AM)
Tony Ringsmuth (4/8/14 4:11PM)
Joshua Fletcher (4/9/14 8:49PM)

Jack Des Bouillons (4/7/14 10:00 AM)


I seem to recall some speaker at a Summit (might have been JPR, might
been Josh, someone else?) saying that

DELAY PROCESS(Current process;0)

Would do the trick of freeing up processor time.

I've never had a need to test it out, but you might try it.

Jack des Bouillons

On 4/7/14 9:07 AM, "Tony Ringsmuth" <tony01@... wrote:

color><param>00000,0000,DDEE/param>II discovered that DELAY
PROCESS(Current process;1) consistently actually
delays 2 to 4 ticks, not just one tick. ?So, a loop such as:
`Do Something
Delay process(current process;1)
... Will only run about 15 times/second compiled.

Tony Ringsmuth (4/7/14 12:14 PM)


I've thought about that, but, I'm un-easy about multiple processes
the same tcp requests, and possible getting out of sync.

Also, I'm un-certain if multiple would all run basically at the same
and then having a big pause until the next cycle of all of them. ?I
have not
tested this one yet.


On 4/7/14 11:37 AM, "Arnaud de Montard" <arnaud@... wrote:

If the tcp listening process does not have to be unique, you could use
than one?

Arnaud de Montard (4/7/14 6:37 PM)


If the tcp listening process does not have to be unique, you could use
more than one?

Arnaud de Montard

Keisuke Miyako (4/8/14 12:50 AM)



the point was described in a tech note (05-20, Jean-Yves Fock-Hoon)

Thibaud also covered it in a Summit presentation 2009.

in essence, IDLE yields to the scheduler, only if the process has
its allocated 1 tick.
otherwise it just carries on. (c.f. PA_Yield)

DELAY PROCESS yields to the scheduler immediately (c.f.


On 2014/04/08 3:00, "Jack Des Bouillons"
<Jack.DesBouillons@... wrote:

color><param>00000,0000,DDEE/param>DDELAY PROCESS(Current process;0)

Tony Ringsmuth (4/8/14 4:11 PM)



Thank you for contributing to this post; ?I really appreciate it.

I hadn't realized before that DELAY PROCESS, for tick counts of less
about 4 are rather imprecise.

I've decided to approach this by recording the last real activity in my
loop, and for a period of Milliseconds, do DELAY PROCESS($cp;0), and
after that period of MS, do DELAY PROCESS($cp;1)

Tony Ringsmuth
Business Brothers Inc.

Joshua Fletcher (4/9/14 8:49 PM)


Another vote for this technique, I think it's the least opaque

Kind regards,


Josh Fletcher
Technical Account Manager
4D, Inc


-----Original Message-----
color><param>00000,0000,DDEE/param>DDid could try to pause less than
once a loop? I mean:

Reply to this message

Summary created 4/9/14 at 4:39PM by Intellex Corporation

Comments welcome at: