Re: delay loop
- Posted by rubis at fem.unicamp.br May 17, 2002
- 456 views
18500/19700 AMD 800 , DOS, (ex) At 01:06 17/5/2002, you wrote: > >Please, could anyone with cpu over 1000mhz. tell me the output of the >following? >... 3515 on P166. > >-- >include get.e >atom tick,ti,z,x tick=0 ti=time() >while time()-ti < .5 do >tick+=1 z=power(56.982,7.3)/tick >end while >function abs(object a) >if a<0 then return-a else return a end if >end function >procedure soft_delay() >for i = 1 to 2 + abs(tick/2400) do >z=power(56.982,7.3)/i end for >end procedure >x=0 ti=time() >while time()-ti < 5 do >soft_delay() soft_delay() >x += 1 end while >printf(1,"%d %s\n",{x/5,":done, any key exits"}) >z=wait_key() >-- >TIA, Wolf > > >