PAUSE

Posted by ChUIMonster on 02-Oct-2006 09:47

Shouldn't the 4GL PAUSE statement support fractional seconds? There are many cases where I want to code statements such as "PAUSE 0.2". For instance when a user is typing a "search" that is linked to a browse (a case where you are positioning the browser as the user types but you don't want the screen to jump around excessively nor to cause ridiculous amounts of network traffic fetching records...) PAUSE 0 + an ETIME check is not good because it essentially results in a busy loop that chews up all available CPU cycles. PAUSE 1 is unsatisfactory because it results in a very perceptible hesitation that disturbs the user interaction.

I'm fairly sure that all platforms that Progress runs on now support sub-second sleep intervals. This would seem like a really minor bit of low hanging fruit.

All Replies

Posted by Tim Kuehn on 02-Oct-2006 11:20

Why use "PAUSE" when you can use "value-changed" on the fill-in, and check the last time a display update was peformed? Doing a diff on a pair of datetime variables will give you millisecond-level resolution.

Having said that, I could see cases where non-integer resolution would be helpful for PAUSE times.

Posted by Thomas Mercer-Hursh on 02-Oct-2006 11:28

Because, when the user types "AB" and pauses, the user expects something to come up and when the user types the B, one doesn't know whether it will soon be followed by C or not.

Posted by ChUIMonster on 02-Oct-2006 11:41

Correct. I'd give you points for clarifying that but I can't seem to find the button

Posted by Thomas Mercer-Hursh on 02-Oct-2006 12:53

I think you have to make the original post a question in order for there to be a button ... silly notion.

Posted by ChUIMonster on 02-Oct-2006 13:15

I tried. It wouldn't let me. Apparently I took to long to compose my question...

Posted by Tim Kuehn on 02-Oct-2006 13:17

You have 15 min after making the original post to turn it into a question.

Posted by ChUIMonster on 02-Oct-2006 13:23

I tried that. Just guessing but apparently the clock starts ticking when you decide to create the thread rather than when you (finally) submit the question.

Perhaps we should conduct further discussion and experiments in the "test" forum?

This thread is closed