Path: utzoo!attcan!telly!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Newsgroups: comp.lang.c Subject: Re: MSC delay() routine? Message-ID: <1990Mar15.232209.12557@druid.uucp> Date: 15 Mar 90 23:22:09 GMT References: <1280001@hpcc01.HP.COM> <1990Mar13.041457.17217@cubmol.bio.columbia.edu> Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain) Organization: D'Arcy Cain Consulting, West Hill, Ontario Lines: 29 In article <1990Mar13.041457.17217@cubmol.bio.columbia.edu> ping@cubmol.bio.columbia.edu (Shiping Zhang) writes: >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 Don't you read this newsgroup? We just went through this discussion a couple of weeks ago. Of course you can assign a struct to a struct. I think it's time you got rid of your K&R1 and replaced it with K&R2. -- D'Arcy J.M. Cain (darcy@druid) | Thank goodness we don't get all D'Arcy Cain Consulting | the government we pay for. West Hill, Ontario, Canada | (416) 281-6094 |