Quote:
Originally Posted by Joohoo
For a while out team has been looking to use a timer. The timer works well, except we need to have a more precise timer than the one that the documentation says is available. Is there a way to make a timer that is more precise (milliseconds/microseconds)?
|
You can call vxTimeBaseGet(), which is a function provided in vxLib.
IMPORT void vxTimeBaseGet (UINT32 * pTbu, UINT32 * pTbl);
This function reads the 64-bit PPC timebase, storing the upper 32 bits at pTbu and the lower 32 bits at pTbl.
The least significant bit should be worth 1/132,000,000 of a second.
It would pay to do a little experimentation with it though, to see if that number is right -- it may actually be 1/133,000,000 seconds.
In any event, it's a very high resolution 64-bit counter.
Precise enough for ya?