Amiga-C (28/157)

From:drHirudo
Date:8 Sep 2001 at 04:53:41
Subject:[amiga-c] Timing with C.

Hello there.

I am not good coder, just writing some tiny programs for entertaining
myself. I have 2 Amigas - one A1000 with 512KB (256 K expansion) RAM and 1
A1200 accelerated with Viper 1230/28/8MB. I use VBCC for compiling. All my
includes and libs are from CATS developer CD. Plus some ixemul/unix
includes downloaded for the internet.

So I wish to know what is the best (the one which gains less CPU cycles)
way to do my executables run at the same speed on the both of my Amigas and
on/or faster Amigas. I.e. they have to be synched with the internal clock
of the computer or is there a way doing this with the custom chipset?

I think of a rountine in the main loop which will take the system time and
will do nothing until particular time has passed. But this must be in a
loop too - getting the system time in every cycle and then cheking it with
the one got in the first place - wasting CPU resourse. Is there any better
way for timing? I had a look at some ROM functions - TR_WAITUNTIL or
better make the program to open IDCMP and checking the IntuiMessage.Seconds
and IntuiMessage.Micros? Or using the timer.device?
I am stuck at the moment. Please help.

Regards.

-->Ventzislav Tzvetkov.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Do you need to encrypt all your online transactions? Secure corporate intranets? Authenticate your Web sites? Whatever
security your site needs, you'll find the perfect solution here!
http://us.click.yahoo.com/wOMkGD/Q56CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/