Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ames!amdcad!sun!exodus!newstop!texsun!csccat!dalnet!dlss2!james From: james@dlss2.UUCP (James Cummings) Newsgroups: comp.unix.internals Subject: Re: Can Unix sleep in terms of mili/micro? Message-ID: <84@dlss2.UUCP> Date: 11 Sep 90 12:11:17 GMT References: <24437@adm.BRL.MIL> Reply-To: james@dlss2.UUCP (James Cummings) Distribution: usa Organization: RedRock Development Lines: 36 In article <24437@adm.BRL.MIL> TAYBENGH%NUSDISCS.BITNET@cunyvm.cuny.edu writes: > > Can Unix sleep in terms of mili or mirco second? I am aware that >sleep() can only sleep in terms of second. Please specify the Unix Dialect >when u reply. Thanks. How 'bout: main() { sleep_less_than_sec(25); exit(0); } sleep_less_than_sec(x) int x; { int i; for (i = 0;i <= x;i++) ; } I'd think that would give you approx. 25 clock cycles, dependent on the machine, the load on the machine, etc. -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |Disclaimer: | James Cummings | | You can't blame me! | UUCP: | | I'm ignorant! | ..swblat!{texbell!texnet.. | |+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+| swgate!dlss1..}!dlss2!james | |Send flames to: | NET: | | sowc@devnull.com | jc@smunews | | | | =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+