[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] nap(3)?



Jeg prøvede med nanosleep, som Stefan foreslog. Oversættelsen gik fint, men
linkeren manglede biblioteksrutinen. Jeg mangler måske at linke med et
system
bibliotek?

Jeg fandt i stedet for rutinen usleep(3), som giver micro-sekunder, som
sover
i mikrosekunder, og det virker perfekt. Jeg kan 'sove' i præcis en halv
time:
time(1) giver tiden med nøjagtigheden 10 millisekunder. Dette er bedre end
tilsvarende tests på HP og SGI.

mvh
Jan Eggert Kofoed

Stefan Ekman wrote:

> Jan Eggert Kofoed wrote:
> >
> > Jeg har brug for en sleep(3) der kun sover i millisekunder (eller
> > kortere).
>
> Testa:
>
>  - Function: int nanosleep (const struct timespec *REQUESTED_TIME,
>           struct timespec *REMAINING)
>      If the resolution of seconds is not enough the `nanosleep' function
>      can be used.  As the name suggests the sleeping period can be
>      specified in nanoseconds.  The actual period of waiting time might
>      be longer since the requested time in the REQUESTED_TIME parameter
>      is rounded up to the next integer multiple of the actual
>      resolution of the system.
>
> (Ur infon till libc)
>
> /Stefan



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *