Eli Zaretskii wrote:
On Thu, 29 Mar 2001, Maurice Lombardi wrote:
What I'm wondering is, if DJGPP's libc contains a delay() function which does handle short delays well (and even seems to use microseconds internally AFAICS), why doesn't its usleep() function do the same thing?
If both functions used the same service, you couldn't have chosen one or the other, depending on your needs. Having both is better than only one.
So what's the advantage of the method used by usleep()? Is it more accurate for longer delays, or doesn't the delay() method work on all kind of Dos / DPMI servers / whatever? Being no DJGPP expert, I'm wondering what we should call now in the GPC units.
From what I see in the docs, a problem with delay() is that "some
operating systems that emulate DOS, such as OS/2 and Windows/NT, hang the DOS session when the @key{Pause} key is pressed during the call to @code{delay}."
Does this mean we shouldn't call usleep() and just accept that short delays don't work, or should we just call delay() because MS-Windows users are used to random system crashes and hangs, anyway? ;-)
Frank