Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!columbia!cubmol!ping From: ping@cubmol.bio.columbia.edu (Shiping Zhang) Newsgroups: comp.lang.c Subject: Re: MSC delay() routine? Message-ID: <1990Mar13.041457.17217@cubmol.bio.columbia.edu> Date: 13 Mar 90 04:14:57 GMT References: <1280001@hpcc01.HP.COM> Reply-To: ping@cubmol.bio.columbia.edu (Shiping Zhang) Organization: Dept. of Biology, Columbia Univ., New York, NY Lines: 19 In article <1280001@hpcc01.HP.COM> azarian@hpcc01.HP.COM (Randy Azarian) writes: >Does anyone have a delay routine written in C? How about sleep()? >Here is what I have. It works, but it isn't too consistant. >If I say delay(1), sometimes I get a delay for one second, and sometimes I >get a microsecond delay. [...] > struct dostime_t time1, time2; [...] > _dos_gettime(&time1); time2=time1; ^^^^^^^^^^^ You can't assign a struct like that. You must assign the elements of a struct individually. -ping