im trying to use the following to have precise timing in a graphical program:
this points to an internal clock which runs at 18.2hz.Code:word *my_clock=(word *)0x0000046C;
this is how i want to use it:
the idea is to stop the program until 0.5 cycles or rather 0.027 seconds have elapsed, then continue (useful for frame limiting in graphical programs).Code:long start=*my_clock; ***action*** while ( (*my_clock-start) < .5 );
the problem is, because the pointer the clock is an int pointer, .5 means 1. i have tried typecasting in many ways, to make it a double or float, but i just cant get any precision. that means i can only support delays of 0.055 seconds or more (believe me, its not enough)
please post a reply if you have an idea or know another way of creating fine precision delays.