[fpc-pascal]nanosleep()

amorel amorel at xs4all.nl
Thu Aug 29 01:48:20 CEST 2002


I want to use this function: int nanosleep (const struct timespec 
*REQUESTED_TIME, struct timespec *REMAINING)

I am using this syntax: 
function nanosleep(args: ??):longint;cdecl;external 'c';

How would the exact syntax be, do I need to declar the parameters 
beforehand also using external 'c'? And how would a const struct timespec 
*REQUESTED_TIME be declared? As I see it it is a constant pointer of 
name requested_time and of type timespec, time.h shows this btw:

/* Pause execution for a number of nanoseconds.  */
extern int nanosleep (__const struct timespec *__requested_time,
                      struct timespec *__remaining) __THROW;

Thanks




More information about the fpc-pascal mailing list