[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] Flushing af stdin



In article <sslug@sslug> you wrote:
.....

> Jeg vil anbefale dig at bruge f.eks. gettimeofday til at måle tid med, så
> du er sikker på at din animation ikke kommer til at afhænge af loaden på
> maskinen.

Man skal vist lige finde de rigtige navne på det kald.
Hvorfor ikke blot "time(2)" som er sekunder siden 1970.
Så har man ikke problemet med skift omkring midndat.
Til gengæld har gettimeofday mulighed for et ektra usec felt,
men det har select(2) også.

MEN, hvad der der galt med select(2) ?
Er den for svært at anvende ?

....
       select  waits  for  a number of file descriptors to change
       status.
....

Og man kan sætte blocking eller blot en timeout i sec/usec, så den
returnerer senest efter den ønskede tid, selvom der ikke var
nogle af de ønskede file descriptors som har ændret status.


-- 
mvh Frank Damgaard  | http://home3.inet.tele.dk/frda/



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 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] *