[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] En ordentlig timing



Hvis IO-Port Howto'en er korrekt så løser mit problem lidt sig selv.
For hvis den serielle port (som nu engang er den jeg bruger) tager
1 ms om at skifte så får jeg det nok ikke til at køre hurtigere.
Er der forresten nogen der kan bekræfte de 1ms forsinkelse på
PC porte ?

Nå men hvis der er nogen der er interesserede i hvad jeg har
fundet ud af så kommer det her:
Både usleep og nanosleep er ikke meget bevendte.
man nanosleep siger selv at dens præcisition kun kan tvinges ned
på 2 ms i en tidskritisk tråd(v.h.a. busy wait), og så vidt jeg kunne
måle passer det vist meget godt.
usleep er lige så upræcis og en ting er sikkert. Det er ikke
platformsuafhængigt(men det er nok meget indlysende).
Om andre POSIX systemer har bedre versioner af usleep og
nanosleep skal jeg ikke kunne sige, men linux og windows
(altså CygWin) har i hvert fald ikke nogen der kan bruges
til andet end at "vente lidt" med.


Mogens Kjaer wrote >Kan rdtsc instruktionen bruges? >Så skal du bare fiske klokfrekvensen fra /proc/cpuinfo > >http://www.linuxdoc.org/HOWTO/mini/IO-Port-Programming-4.html >



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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