I'm looking for a function like delay() which is part of the
Borland C compiler under DOS. Under Linux, I can't find an
equal function?
Including <asm/delay.h> and the delay() function doesn't work
correctly with my gcc on GNU/Linux 2.0.
Does anybody can help me?
--
Marc Gloor / System Engineer e-mail: marc....@kuoni.ch
Kuoni Travel Ltd. (kuoni.com) PublicKeyID: 0x2CDBF3A1
Headoffice Zurich Phone: +41-1-277-42-92
sleep(3) is the recommended (portable) solution. nanosleep(2) has a more
finegrained resolution, but is less portable.
>Including <asm/delay.h> and the delay() function doesn't work correctly
>with my gcc on GNU/Linux 2.0.
On modern Linux system, as an application programmer you should never have
to include headers in <asm/*>, unless you really, really know what you are
doing. <asm/*> is kernel-specific.
HTH,
Ray
--
LEADERSHIP A form of self-preservation exhibited by people with auto-
destructive imaginations in order to ensure that when it comes to the crunch
it'll be someone else's bones which go crack and not their own.
- The Hipcrime Vocab by Chad C. Mulligan
man -s 2 delay
The compiler has nothing to do with how the delay function works.
Speaking only for myself,
Joe Durusau
"Marc O. Gloor" wrote:
>
> Hello,
>
> I'm looking for a function like delay() which is part of the
> Borland C compiler under DOS. Under Linux, I can't find an
> equal function?
>
> Including <asm/delay.h> and the delay() function doesn't work
> correctly with my gcc on GNU/Linux 2.0.
>