Cekani v C-cku.

Jan Kasprzak kas na informatics.muni.cz
Pondělí Únor 2 14:11:43 CET 1998


Jaroslav Honsa pise:
: > Spravne se ceka pomoci usleep(), coz ma rozliseni rovno
: > sysconf(_SC_CLK_TCK), na Linux/i386 10ms. Mensi casovy usek je mozno
: To znamena, ze usleep(100) a usleep(10000) se nerozlisuje? Jak se k tomu
: stavi system?
: 
	usleep je delane pomoci setitimer(2). V prislusne manove strance
se pise:

       Timers  will  never  expire  before  the  requested  time,
       instead  expiring  some  short,  constant time afterwards,
       dependent on the system timer resolution (currently 10ms).

: Kde bych se o tom Real-Time clock dozvedel vic?
: 
	Use the source, Luke! :-) /usr/src/linux/Documentation/rtc.txt

	Do minuleho mailu jsem jeste zapomnel pripsat, ze cekat se
take da pomoci select() - vyhodne zejmena v pripade, kdy chcete behem
cekani na cas cekat take na neco jineho.

-Yenya

--
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
|| I find that the algol60 interpreter, teco and jclsh (ibm JCL emulator  ||
|| shell) are very good for teaching people that computing has moved on.  ||
||                           -- Alan Cox in redhat-devel                  ||



Další informace o konferenci Linux