This project has moved. For the latest updates, please go here.
1

Closed

Clock is not accurate with new code.

description

It appears that there is a bug in the way that the cc65 time library works on the 64 and 128 as in both versions the elapsed time runs about 50% slow compared to actual time.
Closed Oct 21, 2013 at 11:18 PM by GregKing

comments

GregKing wrote Jan 21, 2011 at 10:52 PM

clock() is like BASIC's time and time$ variables: it reads the Kernal's jiffy clock. Jiffies count interrupts; but, interrupts are disabled during the short times that the Kernal is bit-banging the IEC bus. I knew that there would be some "slippage". But, I never imagined that it could be 50 percent!

So, ...
the software clock is too slow; and, the hardware clock is too big. Bummer!

But, I have an idea... (It will get its own issue proposal.)

GregKing wrote Apr 8, 2011 at 1:54 PM

The IEEE bus isn't bit-banged. So, as far as I can tell, the Pet/CBM computers don't have this problem -- they can use clock().

wrote Apr 8, 2011 at 1:57 PM

wrote Feb 14, 2013 at 2:34 AM

wrote May 16, 2013 at 9:06 AM

wrote May 16, 2013 at 9:06 AM

wrote Jun 14, 2013 at 7:51 AM

wrote Oct 21, 2013 at 11:18 PM

wrote Oct 21, 2013 at 11:18 PM