delay loop

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu